R2 CORS issue

I found in this community a couple of posts which describe this post same issue…

I’m successfully generating pre-signed urls (when I try them with curl the files are perfectly uploaded to R2), but once a JS client app inside a browser tries to upload it, it is blocked by the CORS policy of the bucket.

I used the AWS put-bucket-cors API to send a CORS policy json to the bucket and by using get-bucket-cors -i’m able to retrieve it (I can see the json file itself uploaded to the bucket too), BUT te JS client upload still fails.

I believe this s an important isue which must be addressed ASAP, given also the number of posts without an answer on this very same subject.

Best regards.

Found this article which has helped in solving the CORS issue: https://kian.org.uk/configuring-cors-on-cloudflare-r2/

1 Like

Did you get it working with CORS and signed URL Upload through the browser? Which URL do you use for access, a public bucket or an assigned domain access?

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.