s3-swf-upload-plugin icon indicating copy to clipboard operation
s3-swf-upload-plugin copied to clipboard

Upload Error, Access Denied" when trying to upload file

Open leviathan opened this issue 15 years ago • 9 comments

I get that error in the live heroku demo app, as well as with my cloned local copy. I put the amazon parameters in amazon_s3.yml, ran rake db:migrate and generated the bucket, added the crossdomain.xml and set it to public read.

leviathan avatar Sep 07 '09 07:09 leviathan

This is wierd.

I went to http://demo-s3-swf-upload.heroku.com, clicked the browse button, selected a file, and clicked upload.

It uploaded successfully!

GreenAsJade avatar Sep 07 '09 07:09 GreenAsJade

Ok my mistake. The demo app works perfect. Sorry!

However cloning the demo app (http://github.com/GreenAsJade/demo-s3-swf-upload/tree/master) and running it locally does not work. I setup my S3 bucket as described in the README. Could you check if the README is still up to date. Maybe you're doing an extra step which is not mentioned. I assume that the rails demo app works, but something with my S3 setup is not right, but I am kinda clueless.

leviathan avatar Sep 07 '09 08:09 leviathan

So - the README appears fine as far as it goes, but after I read it I do wonder what you put in your amazon_s3.yml, because it doesn't actually tell you very clearly.

The names of the parameters that need to be set are:

access_key_id secret_access_key bucket_name
max_file_size acl

(this is determined in vendor/plugins/s3-swf-upload-plugin/lib/s3_swf_upload/s3_config.rb)

Since these aren't an obvious map from the ENV VAR names maybe this is where things have come unstuck?

GreenAsJade avatar Sep 07 '09 08:09 GreenAsJade

Well I better not tell you what I did wrong. However it turned out that my uploaded "crossdomain.xml" was corrupt. When I checked http://s3.amazonaws.com/[bucketname]/crossdomain.xml my browser told my that its invalid xml.

I fixed that and its working now. Thanks for your patience and help! If you ever get to Berlin let me know and you'll get a beer fro free :)

leviathan avatar Sep 07 '09 09:09 leviathan

Glad it worked out :)

GreenAsJade avatar Sep 07 '09 12:09 GreenAsJade

Actually, I'll leave this open to remind me to update the README with those var names.

GreenAsJade avatar Sep 07 '09 12:09 GreenAsJade

I've just tried it and it is not working. When I clicked upload, it says "Upload Commencing..." for about 20 seconds, then it changes to a button saying "Uploading..." , then the button goes wierd.

Does this with Chrome and Firefox on Linux.

cmrichards avatar Jun 02 '10 00:06 cmrichards

Are you saying that the demo app doesn't work for you:

http://demo-s3-swf-upload.heroku.com/

GreenAsJade avatar Jun 02 '10 01:06 GreenAsJade

It wasn't 8 hours ago, i tried it several times, but I've just tried it now and it's worked. Strange.

cmrichards avatar Jun 02 '10 09:06 cmrichards