Upload images, audio, and PDF files to Cloudflare R2.
Create an R2 bucket on Cloudflare
.env
file.
Copy your endpoint ID and location
cdn.anotherwrapper.com
. Your files will be accessible from that domain.R2.dev
subdomain. Note: This is not recommended for production environments as it is rate-limited..env
file.
Use an R2.dev domain if you don't have a custom one
Click on Manage R2 API tokens
Admin Read & Write
. This allows users to delete their own data.Copy the Access Key ID and the Secret Access Key
.env
file:
@/lib/cloudflare.ts
.