Storage

Move files to Cloudflare R2 and copy existing files safely.

LS
Written By Liza SemLast updated 1 day ago

Attachments, review images and screenshots are stored on your server by default. You can move them to Cloudflare R2 to keep them off the server disk. Nothing changes for clients either way.

Set up R2

  1. In Cloudflare, create an R2 bucket.
  2. Create an R2 API token with read and write access to that bucket. Note the access key ID, secret access key and your account ID.
  3. In Review Studio, go to Settings → Storage.
  4. Choose the R2 driver and enter the account ID, access key ID, secret access key and bucket name.
  5. Press Save storage, then Test connection.

The secret is stored encrypted. You can also set these on the server instead, with R2_ACCOUNT_ID, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY and R2_BUCKET.

Copy existing files

New files go to R2 once it's the active driver. To move your older files too:

  1. In Settings → Storage, press Copy existing files to R2.
  2. Watch the migration progress. Each file is checked after it's copied.

Local copies are never deleted, and files not copied yet are still served from the server. It's safe to run again: files already in R2 are skipped.

On the server, npm run storage:migrate does the same copy from the command line.

Attachment size limit

Attachment limit (MB) on the same page sets the largest file anyone can attach, from 1 to 200 MB. The default is 20.

Was this helpful?

Your feedback shapes what we write next.