Upload directly to Amazon S3 using Plupload HTML5 runtime(使用 Plupload HTML5 运行时直接上传到 Amazon S3)
问题描述
我在上一篇文章中看到 怎么做我让 Plupload 直接上传到 Amazon S3?,这可以从 Pluplod Html5 运行时直接上传到 S3.
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.
我通过将pluploader"托管到我的 S3 存储桶中尝试了您的方法,但我仍然收到来自亚马逊的错误
I tried your approach by hosting my "pluploader" into my S3 bucket but i am still receiving error from amazon
加载资源失败:服务器响应状态为 405(不允许方法)XMLHttpRequest 无法加载 http://xxxxxxxxx.s3.amazonaws.com/.Access-Control-Allow-Origin 不允许来源 http://s3.amazonaws.com
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
推荐答案
更新:Amazon S3 现在支持跨域资源共享,因此现在应该可以上传 HTML5.请参阅此处的文档:http://docs.amazonwebservices.com/AmazonS3/latest/dev/cors.html 和此处的原始帖子:https://forums.aws.amazon.com/message.jspa?messageID=377271#377271
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
抱歉,亚马逊仍然不支持 HTML5 上传,因为它们不支持 Access-Control-Allow-Origin 标头.2年过去了,亚马逊在这个问题上仍然没有任何进展.
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.
在存储桶中托管 iframe 表单的旧方法仅适用于 HTML4 上传,不适用于 HTML5.
The old method of hosting an iframe form in your bucket only works for HTML4 uploads, not with HTML5.
更多信息在这里:https://forums.aws.amazon.com/thread.jspa?threadID=34281
此外,来自 Plupload 人员的更多信息:http://www.plupload.com/punbb/viewtopic.php?pid=2361#p2361
Also, more info from the Plupload guys here: http://www.plupload.com/punbb/viewtopic.php?pid=2361#p2361
如果您想使用标准文件输入字段将文件上传到 S3,我建议您阅读本教程...否则您将不得不使用 Flash、Silverlight 等进行上传.
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
这篇关于使用 Plupload HTML5 运行时直接上传到 Amazon S3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 Plupload HTML5 运行时直接上传到 Amazon S3
基础教程推荐
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
