MultiPowUpload(flash文件上传组件),给出错误#2049,同时上传到Amazon S3 [英] MultiPowUpload (flash file upload component) giving Error #2049 while uploading to Amazon S3
问题描述
使用 MultiPowUpload (flash文件上传组件)上传文件到 Amazon S3的。
Using MultiPowUpload (flash file upload component) to Upload files to Amazon S3.
我只是使用 flash_amazons3generator.html 文件生成S3政策和签名变种粘贴 Flash变量= {}
I just use the flash_amazons3generator.html file to generate the "S3 Policy and Signature" to paste in var flashvars = {}.
但是,当我试图把它上传给我的错误#2049
But when I tried to upload it giving me "Error #2049".
下面是我的 S3政策和签名
var flashvars = {
"uploadUrl": "http://myBucket.s3.amazonaws.com",
"amazonS3.accessKeyId": "xxxxxx",
"amazonS3.policy": "xxxxxx",
"amazonS3.signature": "xxxxx",
"amazonS3.acl": "public-read-write",
"amazonS3.key": "xxxxx"
};
我还试图用'恩codeURI和EN codeURIComponent的方法,可能是它的一个问题,是由于编码却无济于事:
I also tried to use 'encodeURI' and 'encodeURIComponent' method, may be its a problem due to Encoding but no avail:
'policy': encodeURI(data.policy)
'signature': encodeURIComponent(data.signature)
任何想法,我要去的地方错了?
Any idea where I am going wrong?.
推荐答案
我得到的解决方案,它是怎么了。该解决方案是我失去了一个重要的事情。那我应该设置为crossdomain.xml文件为text / xml的内容类型。
I got the solution where its is going wrong. The solution is I'm missing one important thing. That I should set the content type for crossdomain.xml file to text/xml.
下面的图像会有所帮助。如何设置的是:
The following image will help. How to set that:
这篇关于MultiPowUpload(flash文件上传组件),给出错误#2049,同时上传到Amazon S3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!