Error #2176 Swfupload
it to users using Flash 10. Flash 10 changes how javascript and flash are allowed to interact thus breaking the html upload button that calls javascript to present the file choosing dialog box. If you run SWFUpload in debug mode you will get Error #2176. To fix: Download SWFUpload v2.2.0 Beta 3 Core.zip (optional) Backup your swfupload.js and your swfupload.swf file Unzip and overwrite your existing swfupload.js and your swfupload.swf file. You might need to rename the swf to match your swf name. If you try the uploader at this point you will receive a javascript error: SWFUpload Could not find the placeholder element. Create a button image that will be used instead of the upload html input. Adjust your JavaScript to include the following attributes: button_placeholder_id : "spanSWFUploadButton", button_image_url : "http://www.yourdomain.com/yourbutton.png", button_width : 61, button_height : 22 Add a span tag with the element ID you specified above. Update: In order for your image to work properly, it must have 4 states. Refer to this post. If things are still not working for you, be sure to turn debug: true and review the javascript error log. Hope this helps others. Posted in Tutorials Tags flash, flash10, swfupload Meta 3 comments, permalink, rss, atom Search My name is Ben Reubenstein and I'm a technology entrepreneur working on Xcellent Creations. You can follow me on twitter, LinkedIn, and see things I find interesting on my MicroBlog. Archive of All Posts Install RMagick Mac OS X 10.5 attachement_fu now with Local File Fu Taking Merb to Production Backing up Subversion Repositories with hot-backup.py AWStats and Lighttpd Crontab Tutorial Toggle Google Map Markers Rails, Ruby 1.8.4 and Windows Fixing Gentoo MySQL 5.0.24 and Ruby on Rails Gentoo Linux GCC 3.4.6 to GCC 4.1.1 Upgrade Fix your $PATH on Mac OS X after using Python Installer 2.5 Categories Announcement Friends Gentoo Google Interview JavaScript Lighttpd Linux Movies OS X Pictures Ruby on Rails Sports Travel Tu
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Using http://benr75.com/tag/swfupload Rails with Paperclip and SWFUpload up vote 6 down vote favorite 3 I have a basic rails application test with a user model that has a photo field handled with paperclip. I created the views to be able to create/edit an user and the photo uploading is working nicely.
Editing user
<% form_for :user, @user, :url => user_path(@user), :html => { :method => "put", http://stackoverflow.com/questions/900769/using-rails-with-paperclip-and-swfupload :multipart => true } do |f| %> <%= f.error_messages %> <%= f.label :first_name %>
<%= f.text_field :first_name %>
<%= f.label :last_name %>
<%= f.text_field :last_name %>
<%= f.label :file %>
<%= f.file_field :file %>
<%= f.label :photo %>
<%= f.file_field :photo %>
<%= f.submit 'Update' %>
<% end %> <%= link_to 'Show', @user %> | <%= link_to 'Back', users_path %> Then, I wanted to integrate SWFUpload in my application. I tried to follow this tutorial and run the test project without any success: the browse button doesn't open a file dialog and an error #2176 is threw which is about the selectFiles() method. First, the problem is about Flash v.10 that isn't compatible with the old version of SWFUpload (2.1.0) included with the project : selectFiles() is now deprecated. So I tried to upgrade to SWFUpload v. 2.2.0 which now use a button_placeholder_id setting but I can't get any example to work. So i'm a bit lost about how to use SWFUpload initialization and about and to use it in my form so I can upload a»Plugin/Gem Usage and Development »Using Paperclip and SWFUpload Pages 1 Posts [ 1 ] 1 Topic by uneek 2009-05-23 01:56:06 uneek Registered: 2009-05-22 Posts: 1 Topic: Using Paperclip http://archive.railsforum.com/viewtopic.php?id=30879 and SWFUpload I have a basic rails application test with a user model that https://wordpress.org/support/topic/can-post-pics has a photo field handled with paperclip. I created the views to be able to create/edit an user and the photo uploading is working nicely.
Editing user
<% form_for :user, @user, :url => user_path(@user), :html => { :method => "put", :multipart => true } do |f| %> <%= error #2176 f.error_messages %> <%= f.label :first_name %>
<%= f.text_field :first_name %>
<%= f.label :last_name %>
<%= f.text_field :last_name %>
<%= f.label :file %>
<%= f.file_field :file %>
<%= f.label :photo %>
<%= f.file_field :photo %>
<%= f.submit 'Update' %>
<% end %> <%= link_to 'Show', @user %> | <%= link_to 'Back', users_path %>Then, I wanted to integrate SWFUpload in my application. I tried to follow this tutorial[1] and run the test project[2] without any success: the browse button doesn't open a file dialog and an error #2176 is threw which is about the selectFiles() method. First, the problem is about Flash v.10 that isn't compatible with the old version of SWFUpload (2.1.0) included with the project : selectFiles() is now deprecated. So I tried to upgrade to SWFUpload v. 2.2.0 which now use a button_placeholder_id setting but I can't get any example to work.So i'm a bit lost about how to use SWFUpload initialization and about and to use it in my form so I can upload and save a photo. Any helps? [1]: http://jimneath.org/2008/05/15/swfuploa -on-rails/ [2]: http://jimneath.org/wp-content/uploads/ pload1.zip Posts [ 1 ] Pages 1 Rails Forum - Ruby on Rails Help and Discussion Forum »Plugin/Gem Usage and Development »Using Paperclip and SWFUpload Hosting provided by aTech Mediapost pics rchafin @rchafin 7 years, 4 months ago Hello All, Please forgive my naivety, and my first post, but I can not seem to add pictures to my posts. I let my blog lapse for a while, and in the down time purchased a new machine. When I tried to get the blog up and going again, and using the new Vista enable machine, I receive the following error: Error: Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press. at flash.net::FileReferenceList/browse() at SWFUpload/SelectFiles() at Function/http://adobe.com/AS3/2006/builtin::apply() at flash.external::ExternalInterface$/_callIn() at