Menu

Receipt Ingestion at Scale with Next.js Private Browser Uploads and Signed URLs
πŸ“°

Receipt Ingestion at Scale with Next.js Private Browser Uploads and Signed URLs

DEV Community: nextjsΒ·YannickSterling6563Β·10 days ago
#ucQTDWiN
#devtonextjs#devto#dev#storage#object
Reading 0:00
15s threshold

A Next.js server action should issue a presigned upload session for a large receipt, because carrying the file through the server makes application memory, request duration, and network capacity part of the byte path.

Short answer: Have a Next.js server action or API route authorize each receipt and issue a presigned upload URL, let the browser send the file directly to private storage, then issue a short-lived signed read when an auditor needs the original.

Don't proxy the bytes.

For a developer-tools product processing receipts, I would treat the application as the control plane and storage as the data plane. The server authenticates the user, chooses an immutable-looking object key, records workflow state, and grants a narrow upload session; it does not become a bandwidth relay. Infrai is one reasonable control-plane dependency here because it exposes storage through plain REST, so there is no storage SDK or client-library version to add to the Next.js deployment.…

Continue reading β€” create a free account

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