Cloudflare R2 and S3 storage for uploads and AI output
Store avatars, uploads and AI-generated images and videos in Cloudflare R2 (or any S3-compatible storage) from a ShipAny app — bucket, API token, custom domain and admin settings.
Last updated: Oct 8, 2026
Any SaaS that accepts uploads or produces files needs object storage. ShipAny uses Cloudflare R2 by default and works with any S3-compatible service — R2's zero egress fees make it a good fit for serving AI-generated images and videos.
What ShipAny handles
- Image uploads (avatars, reference images) through
/api/storage/upload-image, with an allowlist of raster image types — SVG is deliberately rejected. - Saving AI results: generation providers hand their output files to the storage service, so results live in your bucket rather than on the model provider's temporary URLs.
- Public URLs on your own domain, and an optional upload path prefix to organize files.
Setup
- In the Cloudflare dashboard, go to R2 object storage and create a bucket.
- For development, enable the bucket's Public Development URL (
https://pub-xxx.r2.dev). For production, add a custom domain such ashttps://cdn.your-domain.com— the dev URL is rate-limited. - Under Manage API tokens, create a user API token with access to the bucket and copy the access key ID, secret access key and endpoint.
- In ShipAny, open Admin → Settings → Storage and fill in the access key, secret key, bucket name, domain (your public URL) and, optionally, the endpoint and upload path.
- Upload an avatar on
/settings/profileand open the image in a new tab to confirm it's publicly reachable.
Tips
- On Cloudflare Workers, storage isn't optional — there's no writable filesystem, so uploads and AI results need R2.
- Always set the domain field to a public URL; otherwise files upload fine but links to them won't load.
- Using AWS S3 or another S3-compatible service? Fill in its endpoint — the same settings apply.
