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

懵懂的女人 提交于 2019-11-30 15:52:00

问题


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:


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



来源:https://stackoverflow.com/questions/8463694/upload-directly-to-amazon-s3-using-plupload-html5-runtime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!