Question

Using MultiPowUpload (flash file upload component) to Upload files to Amazon S3.

I just use the flash_amazons3generator.html file to generate the "S3 Policy and Signature" to paste in var flashvars = {}.

But when I tried to upload it giving me "Error #2049".

Here is my S3 Policy and Signature:

 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"
 };

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?.

Was it helpful?

Solution

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: crossdomain.xml file to text/xml

OTHER TIPS

Please note that you should place crossdomain.xml file at the root of your bucket in order to allow MultiPowUpload upload files into this bucket. And grant 'public-read' permissions to this file. Read more about crossdomain security policy at MultiPowUpload documentation.

You can read more in tutorial http://www.element-it.com/OnlineHelpMulti/Tutorial.html#amazon

Here you can see that upload to S3 server work correctly: demo.element-it.com/Examples/MultiPow/flash_uploadtoamazons3.html

Also you can grab crossdomain.xml from elemen-it s3 bucket: http://element-it.s3.amazonaws.com/crossdomain.xml

Feel free to contact Element-IT support team if you have any questions related to our products.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top