Hi everyone. I've been trying to follow this tutorial to let my users upload a bunch of mp3s at once and see the progress.
http://www.railstoolkit.com/posts/uploading-files-directly-to-amazon-s3-using-fancyupload
I implemented it pretty much more or lese exactly, but I removed some of the things from the policy file, so there's only ['starts-with', '$key', '#{key}/'],
instead of the other starts-with stuff which was causing it to fail when I manually put a field and submit into the form.
I also turned on verbose mode. This is what I get when trying to upload a file:
Main::fireEvent "buttonEnter"Swiff.Uploader.js (line 370)
Main::fireEvent "buttonDown"Swiff.Uploader.js (line 370)
Main::fireEvent "buttonEnter"Swiff.Uploader.js (line 370)
Main::fireEvent "browse"Swiff.Uploader.js (line 370)
Main::fireEvent "buttonLeave"Swiff.Uploader.js (line 370)
Main::handleSelect Adding FilesSwiff.Uploader.js (line 370)
Main::hasFile: Checking tarzanandjane.mp3Swiff.Uploader.js (line 370)
Main::fireEvent "select": [[Object id=2 addDate=1259106078359 name=tarzanandjane.mp3 0=Object $family=Object], null, Object uploading=0 bytesLoaded=0 rate=0 size=2891446]Swiff.Uploader.js (line 370)
File[2]::start: ObjectSwiff.Uploader.js (line 370)
Main::fireEvent "fileStart": [Object id=2 addDate=1259106078359 name=tarzanandjane.mp3, Object uploading=1 bytesLoaded=0 rate=0 size=2891446]Swiff.Uploader.js (line 37
What actually happens is that it creates an entry with a stuck progress bar and the correct size of the file, but nothing more seems to happen. I also notice that every time I go to upload a file, I get an error in the net panel of firebug:
ActionController::UnknownAction (No action responded to none. Actions: xxx...):
C:\Ruby\bin\mongrel_rails:19:in `load'
C:\Ruby\bin\mongrel_rails:19
-e:2:in `load'
-e:2
The really frustrating thing about these problems is that I'm not sure what the best way to go about debugging them is. It's hard for me to see if s3 is complaining about something and silently failing behind the scenes. I can get the URL param string (which looks fine), but that needs to be sent along with a file, so I can't just copy and paste it onto my amazonws file. I've made sure my ACL is very loose and it should pretty much let anyone write anything. As I said before when I put in the fake file field and submit button, they are uploaded to s3. The "none" action is also really annoying because I have no idea what may be causing that in my code. If I could even just get some advice about debugging things like this, that would be great.