I am trying to upload a file from an application to S3.
and i am getting the below error
Access to XMLHttpRequest at 'https://yellow-pages-bahrain.s3.amazonaws.com/Chrysanthemum?AWSAccessKeyId=******************&Content-Type=jpg&Expires=1595840227&Signature=knHfUhZ7kqvWLAQlfsbCpzY96as%3D' from origin 'http://localhost:3003' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I have configured the CROS policy as
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>HEAD</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
Am i missing anything. What else needs to be added to this?