Upload directly to Amazon S3 using Plupload HTML5

2019-02-10 15:42发布

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

1条回答
啃猪蹄的小仙女
2楼-- · 2019-02-10 16:22

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

查看更多
登录 后发表回答