Browser-Side Amazon S3 Uploads, Using CORS and JavaScript
http://bencoe.tumblr.com/post/30685403088/browser-side-amazon-s3-uploads-using-cors
With CORS you can now easily build web applications that use JavaScript and HTML5 to interact with resources in Amazon S3, enabling you to implement HTML5 drag and drop uploads to Amazon S3, show upload progress, or update content.
(
16 comments
| 58 points
| on HN
)
I went MongoDB + GridFS. It has worked out well so far. Really like that I can store the meta-data right with the binary data in MongoDB, and can query and filter directly on the meta-data. Also, using a MongoDB replica set, I get automatic redundancy of files.
I made a quick demo video of the upload feature showing drag & drop, and the files interface, check it out if you please: http://www.youtube.com/watch?v=ru7YZ2E65YU
The other benefit I see in going straight to S3 is that I can use the S3 URL to display the image to the user in context immediately after upload even though it hasn't been resized. The worker can just update the image URL when its done with its resizing.
How safe is it against abuse [i.e. MITM, dos]? Most probably I am missing smth, but if credentials are applied in browser, can user get hold of them and upload a couple of petabytes?
http://caniuse.com/cors
Definitely a bit spotty. It's good for my use-case, which is Firefox, and Chrome, extension development.
> "choose the S3 option from your EC2 Management Console."
do you mean AWS Management Console?