使用 Plupload HTML5 运行时直接上传到 Amazon S3

发布于 2024-12-21 02:43:33 字数 561 浏览 2 评论 0原文

我在上一篇文章中看到 如何制作 Plupload直接上传到 Amazon S3?,这可以从 Pluplod Html5 运行时直接上传到 S3。

我通过将我的“pluploader”托管到我的 S3 存储桶中尝试了您的方法,但我仍然收到来自亚马逊的错误

无法加载资源:服务器响应状态为 405(不允许方法) XMLHttpRequest 无法加载 http://xxxxxxxxx.s3.amazonaws.com/。 Access-Control-Allow-Origin 不允许来源 http://s3.amazonaws.com

有人吗那可以帮助我吗?谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

画尸师 2024-12-28 02:43:33

更新:Amazon S3 现在支持跨源资源共享,因此现在应该可以进行 HTML5 上传。请参阅此处的文档: http://docs.amazonwebservices.com/AmazonS3/latest/ dev/cors.html 和原始帖子:https://forums.aws.amazon.com/message.jspa?messageID=377271 #377271


抱歉,亚马逊仍然不支持 HTML5 上传,因为它们不支持Access-Control-Allow-Origin 标头。两年过去了,亚马逊在这个问题上仍然没有任何进展。

在存储桶中托管 iframe 表单的旧方法仅适用于 HTML4 上传,不适用于 HTML5。

更多信息请点击这里:
https://forums.aws.amazon.com/thread.jspa?threadID=34281

此外,Plupload 人员提供的更多信息如下:
http://www.plupload.com/punbb/viewtopic.php?pid =2361#p2361


如果您想使用标准文件输入字段将文件上传到 S3,我建议您阅读本教程...否则您将不得不使用 Flash、Silverlight 等来上传。

http://aws.amazon.com/articles/1434?_encoding=UTF8& ;jiveRedirect=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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文