DELETE files from S3 using CORS

Im saving images on Amazon S3. I finally uploaded the images (following the idea suggested here: Loading an image ) with XMLHttpRequest, and it works very well.

Now I'm trying to remove images from s3, but when I change the method on xml.open to "DELETE" and submit the form, Amazon responds with a forbidden message. I enabled upload / delete under permissions in the AWS console and edited the CORS configuration to enable DELETE

Actually, right now, to send files to S3 Im using the POST request, but the PUT request does not work either.

+4
source share
1 answer

Have you added the following to your CORS configuration with POST?

<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
0
source

All Articles