Cloudflare R2 is the cheapest S3-compatible storage option that works with Fileflare. Free up to 10 GB, around $15/TB after that, and — unlike AWS — no bandwidth charges, ever. For most stores, R2 is the right “bring your own storage” choice.
Available on the Growth plan and higher. R2 connects via Fileflare’s custom-S3 settings since it’s S3-compatible. Files on R2 don’t count toward your Fileflare storage quota.
When you’d use this
- You sell large digital files and want to control storage costs.
- You want unlimited download bandwidth without worrying about egress fees.
- You’re already on Cloudflare and want files alongside Workers, Pages, etc.
Set up R2
1. Sign up and add billing
- Sign in to Cloudflare.
- Click R2 in the left navigation.
- Add billing details (free tier exists, but billing is required to enable).
2. Create a bucket
- Click Create bucket.
- Pick a name (lowercase, no spaces).
- Save.
Keep the bucket private. Fileflare delivers every download through a signed link that expires, so you don’t need public access, the r2.dev subdomain, or a custom domain on the bucket.
3. Copy the S3 API endpoint
In your bucket’s Settings, copy the S3 API URL and remove the bucket name from the end. It looks like https://<account-id>.r2.cloudflarestorage.com. You’ll paste this into Fileflare’s Endpoint field.
4. Set CORS
Uploads go straight from your browser to the bucket, so R2 has to allow them.
- In Fileflare, go to Settings » File storage, click Add connection, and copy the CORS config shown at the bottom of the form.
- In Cloudflare, open your bucket’s Settings, scroll to CORS policy, and click Add CORS policy.
- Paste the config exactly as Fileflare shows it, and save.
Keep * as the allowed origin and ETag in the exposed headers. Large files upload in parts, and those uploads fail without ETag.
If the bucket already has CORS rules, you can keep uploads and downloads in separate rules instead: one that allows PUT and exposes ETag, and one that allows GET. Either way, the bucket must allow GET, because your customers’ online file viewer reads files with it.
5. Create an API token
- In R2, click Manage R2 API Tokens, then Create API token.
- Choose Object Read & Write permissions.
- Apply the token to your Fileflare bucket only (Apply to specific buckets only). Fileflare only lists, uploads, downloads, and deletes files in that bucket, so it doesn’t need admin or account-wide access.
- Click Create.
- Copy the Access Key ID and Secret Access Key. Cloudflare only shows the secret once.
Connect Fileflare to R2
In Fileflare, go to Settings » File storage and click Add connection:
- Provider: choose Cloudflare R2.
- Bucket: your R2 bucket name.
- Region: set to
autofor you. R2 doesn’t use per-bucket regions. - Folder: the folder Fileflare stores new files in, such as
fileflareor your store name. This one’s required. - Endpoint: the S3 API URL from step 3, without the bucket name.
- Access key: paste the R2 Access Key ID.
- Secret key: paste the R2 Secret Access Key.
Leave Use path style endpoint off. R2 works either way, so there’s no reason to turn it on.
Click Add connection. Fileflare tests the connection before it saves.
Test with an upload
An Object Read & Write token can’t read the bucket’s CORS policy, so the connection test can’t check it for you. Right after connecting, upload a file from the Assets page. If it goes through, you’re done. If it fails, recheck the CORS policy from step 4.
Connection options
Same options apply as on AWS S3 — see the S3 doc for path-style endpoint, delete sync, and rename-on-upload details.
Common issues
- Upload fails with a CORS error — copy the CORS config from Fileflare again and paste it into the bucket’s CORS policy unchanged. Check that the allowed origin is
*andETagis an exposed header. - “Unable to connect to S3 bucket” — check the endpoint (the S3 API URL, without the bucket name), the bucket name, and both keys.
- Upload fails with access denied — the token needs Object Read & Write on this bucket. A read-only token can’t upload.