I want to upload a file to my bucket object storage on ovh cloud using s3.upload from aws-sdk in react, and I have already configured CORS of the server like this:
{
"CORSRules": [
{
"AllowedHeaders": ["*"],
"AllowedMethods": ["GET", "PUT", "DELETE", "POST"],
"AllowedOrigins": ["*"],
"ExposeHeaders": ["Access-Control-Allow-Origin"]
}
]
}
I get always this error
Access to XMLHttpRequest at ‘https://xxxxx.s3.sbg.io.cloud.ovh.net/videos/fef70a9a-c9ca-4606-8a97-edfda0f26115’ from origin ‘http://localhost:3000’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Whereas if I use the ALLOW CORS extension on browser, everything works