Cloudflare R2
Cloudflare R2 pairs well with Sendcrate’s Gated and Direct links because R2 charges zero egress fees.
Connection settings
Section titled “Connection settings”In Sendcrate, go to Add bucket and choose Cloudflare R2:
| Field | Example / Notes |
|---|---|
| Endpoint URL | https://<account-id>.r2.cloudflarestorage.com |
| Bucket name | my-r2-bucket |
| Base path (optional) | sendcrate/ — restricts browsing and sharing to a prefix inside the bucket |
| Access key ID / Secret access key | From an R2 API token scoped to this bucket |
| Public base URL (optional) | Custom domain bound to the bucket (enables Public delivery) |
Creating an R2 API token
Section titled “Creating an R2 API token”- In the Cloudflare Dashboard, open R2 Object Storage → Manage R2 API Tokens → Create API token.
- Choose Object Read & Write (or Object Read only if you do not need browser uploads or drop links).
- Scope the token to Apply to specific buckets only and select your bucket.
- Copy the Access Key ID and Secret Access Key into Sendcrate.
Delivery modes on R2
Section titled “Delivery modes on R2”- Gated, Proxied, and Direct links work out of the box.
- Public links are unavailable by default because R2 does not support per-object ACLs or S3 bucket policies. If you want Public delivery on an R2 bucket, bind a custom domain to the bucket in Cloudflare (which makes the entire bucket publicly readable) and enter that URL as the bucket’s Public base URL in Sendcrate.
Browser access (CORS)
Section titled “Browser access (CORS)”In Cloudflare Dashboard → R2 → your bucket → Settings → CORS policy, add:
[ { "AllowedOrigins": [ "https://app.sendcrate.io", "https://send.sendcrate.io" ], "AllowedMethods": ["GET", "PUT", "HEAD"], "AllowedHeaders": ["*"], "ExposeHeaders": ["ETag", "Content-Length", "Content-Range"], "MaxAgeSeconds": 3000 }](If you self-host, replace AllowedOrigins with your own app_url and share_url.)
Staged upload lifecycle rule
Section titled “Staged upload lifecycle rule”In Cloudflare Dashboard → R2 → your bucket → Settings → Object lifecycle rules, create a rule for the .sendcrate/staging/ prefix:
- Prefix:
.sendcrate/staging/ - Delete uploaded objects: after 1 day
- Abort incomplete multipart uploads: after 1 day
Sendcrate verifies the rule automatically when you save the bucket connection.
Live change detection (optional)
Section titled “Live change detection (optional)”R2 can forward object-create and object-delete events through a Cloudflare Queue and a small consumer Worker that signs each event with x-sendcrate-signature (HMAC-SHA256) and POSTs it to the bucket’s webhook URL shown in Sendcrate’s Live change detection section. See Webhooks for signature details.