Upload files to Cloudflare R2 from Next.js
Send files from the browser straight to an R2 bucket in a Next.js App Router app, with presigned URLs, bucket CORS, type and size limits, and a file size you can trust.
Notes on direct uploads to an S3 bucket you own.
Send files from the browser straight to an R2 bucket in a Next.js App Router app, with presigned URLs, bucket CORS, type and size limits, and a file size you can trust.
A new share() plugin gives db() files and folders links anyone can open, with expiry, passwords, download limits, and revocation.
Signed upload tickets, one error catalog, React hooks that keep state per file, a file browser you compose, folders in db(), and a plugin SDK. 2.0 is stable on npm.
Avatar and logo uploads in an open-source Next.js 16 SaaS. One dimah-s3 instance, a scope per user and organization, owned URLs, and cleanup.
The server signs a short-lived URL. The browser talks to your S3 bucket. Credentials stay on the server.