CORS s3 upload error need updated tutorials for amazon s3

I have a problem with uploading a single image using the s3 upload control.
Followed the tutorial, added cors with the * header:



checked and regenerated access and secret keys but keep getting this error message:

Seems this is an ongoing issue for users, I have also tried amazon s3 as an alternative however, the tutorial for setting up cors is now out of date, as amazon s3 cors config requires json format not xml.


My preference would be use digital ocean but if that’s not possible then I will use aws.
Any help would be appreciated.

Here’s a basic CORS config in JSON. Update your domain xxxxx.org as appropriate

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "PUT",
            "POST",
            "DELETE"
        ],
        "AllowedOrigins": [
            "https://dev.xxxx.org"
        ],
        "ExposeHeaders": []
    },
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "PUT",
            "POST",
            "DELETE"
        ],
        "AllowedOrigins": [
            "https://dev.xxxxx.org"
        ],
        "ExposeHeaders": []
    },
    {
        "AllowedHeaders": [],
        "AllowedMethods": [
            "GET"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": []
    }
]

Great thanks scalaris,

Still getting error message after copy and pasting your code…
Here are the screen shots.


image

That is because the code in his post was not formatted, so double quotes as you can see are not correct. Please copy the code again from the post and it should be fine.

Ok cors setup in AWS as shown and saved.

-access key and private key set and checked.
-global AWS s3 provider created
-upload api setup
image

error message recieved
image
image
access key does not match???

screen clip showing it does match…what is going on???
image

Ok seems I was trying establish a connection using the root / secret key instead of using the keys created for the bucket.

Thanks for your help guys.