R2 as static files server

Hi,

We’re using Django + sjango-storages and, the workflow we imagine with R2 is:

  • Upload static-files with manage.py collectstatic (works with boto3)
  • Point a subdomain at the bucket; set CORS settings (this doesn’t seem to have a way to do)
  • Voila! Static files are now available at static.mydomain.io.

Is this workflow currently supported?

Thanks.

1 Like

If you deploy a Worker in front of your R2 bucket, then yes it should be!

Buckets can’t be public themselves directly today without a Worker in front, but if you throw something like this in front of your bucket, I believe this should fit your use case.

2 Likes

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