r2 enable public access via api
ive been reading the r2 api documentation and
its not quite clear to me how I can allow public access
https://developers.cloudflare.com/api/operations/r2-create-bucket
thanks for the help
Cloudflare API Documentation
Interact with Cloudflare's products and services via the Cloudflare API
4 Replies
i think that's a dashboard-only api
just make one bucket and use folders in the bucket
alternatively, if you really want different buckets, you can use presigned get urls via the s3 api
thanks!
It's not dashboard only (very few endpoints are) but it is undocumented so it could change at any time. Make sure you're using R2 Custom Domains and not the r2-pub.dev URLs which aren't meant for production/rate-limited as well
interesting