How to private all files directly, and leave only signed url?

For Workes & Pages, what is the name of the domain?

example.com

What is the issue or error you’re encountering

private public

What steps have you taken to resolve the issue?

I used to use s3, and it had the ‘visibility’ option, it was much easier.

I want to upload all my ‘video’ files, and be able to access them only via signed URLs, with expiration etc. If I try to access the .mp4 file directly it is not possible, how can I do this? It seems confusing to me.

Cloudflare R2 does not have object ACLs or even a concept of public and private objects.

In Cloudflare R2, all objects are private unless you setup a custom domain or enable public bucket URL - then all objects will be public.

You can continue to use presigned URLs to grant temporary access to private objects.

By default they are already ‘private’, as soon as I add the domain it automatically becomes public, is there a way for me to add the domain but keep it private?

No, that’s not possible. What’s the use case for a custom domain when you need to authenticate requests anyways?

Branding, logging, statistics, better access control.

I have a project that needs to be able to toggle public/private status for specific files in a bucket at will because the distribution flow of the users I represent require that. And because putObjectAcl is not implemented in R2 API, its not possible to individually control this through S3 methods.

I came upon this thread through a google search, hoping that it would help, but apparently there isnt a feature like this.