I needed to change my AWS S3 bucket CORS policy to enable the upload of files for my ReactJS to AWS S3, but I keep getting this API response:
Expected params
I'm not sure if this helps. I ran into this same problem recently and it seems like AWS made some changes with how we define our CORS configurations. For example, if you want to allow certain Methods on your S3 bucket in the past you have to do something like this on the editor:
*
GET
PUT
POST
HEAD
DELETE
3000
*
The config below is equivalent to the one on the top but takes the form of an array.
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"GET",
"PUT",
"POST",
"HEAD",
"DELETE"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": [],
"MaxAgeSeconds": 3000
}
]
Let me know if this helps. Thank you!