Menu

Next.js Server Action Presigned Uploads — Private Storage, Browser Direct and Signed URLs
📰

Next.js Server Action Presigned Uploads — Private Storage, Browser Direct and Signed URLs

DEV Community: nextjs·DorianVale91583·about 1 hour ago
#alMfsdGx
#devtonextjs#devto#dev#storage#tenant
Reading 0:00
15s threshold

Short answer: for a marketplace that serves private reports, let a Next.js server action mint a short-lived presigned upload URL, send the browser straight to a private bucket, and mint a separate signed read URL when the customer downloads. Pick the storage backend by testing tenant isolation, not by counting SDK methods.

The request path is small: browser asks your app for an upload session; the app authenticates the customer, chooses a key under that tenant, and asks storage to presign it; the browser uploads the File without streaming bytes through Next.js. Later, your app checks its database record and issues a short-lived read link. The bucket stays private.

Infrai is one candidate for the signer leg when you want a plain REST contract while comparing S3-compatible backends; it is not the answer to every storage requirement.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.