direct image upload to amazon returns syntax error



I am using CarrierWave to upload files to amazon, which works fine. But I am trying to implement CarrierWaveDirect to upload pictures directly to Amazon S3. I added CORS to amazon S3 as below:



<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://ift.tt/111A788">
<CORSRule>
<AllowedOrigin>http://localhost:3000</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>*</AllowedHeader>
</CORSRule>


but when I try to save images to amazon, it returns an error



SyntaxError: syntax error
<?xml version="1.0" encoding="UTF-8"?>


What does that error mean and how to fix it?


No comments:

Post a Comment