Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upload directly to Amazon S3 using Plupload HTML5 runtime [closed]

I saw in one a previous post How do I make Plupload upload directly to Amazon S3?, that this is possible to direct upload from Pluplod Html5 runtime to S3.

I tried your approach by hosting my "pluploader" into my S3 bucket but i am still receiving error from amazon

Failed to load resource: the server responded with a status of 405 (Method Not Allowed) XMLHttpRequest cannot load http://xxxxxxxxx.s3.amazonaws.com/. Origin http://s3.amazonaws.com is not allowed by Access-Control-Allow-Origin

Is there someone thar can help me ? Thanks

like image 576
Yohann Sabbah Avatar asked Feb 23 '23 04:02

Yohann Sabbah


1 Answers

UPDATE: Amazon S3 now supports Cross-Origin Resource Sharing so HTML5 uploads should now be possible. See the docs here: http://docs.amazonwebservices.com/AmazonS3/latest/dev/cors.html and the original post here: https://forums.aws.amazon.com/message.jspa?messageID=377271#377271


Sorry, but Amazon still does not support HTML5 uploads because they do not support the Access-Control-Allow-Origin header. It's been 2 years and there is still no progress from Amazon in regard to this issue.

The old method of hosting an iframe form in your bucket only works for HTML4 uploads, not with HTML5.

More info here: https://forums.aws.amazon.com/thread.jspa?threadID=34281

Also, more info from the Plupload guys here: http://www.plupload.com/punbb/viewtopic.php?pid=2361#p2361


If you want to upload a file to S3 using a standard file input field, I would recommend reading this tutorial... otherwise you'll have to use Flash, Silverlight, etc. to upload.

http://aws.amazon.com/articles/1434?_encoding=UTF8&jiveRedirect=1

like image 160
iwasrobbed Avatar answered Apr 28 '23 03:04

iwasrobbed