Next.js file upload progress with server actions and a route handler

A server action can take a file, but it can't tell the browser how much has been sent. For a real progress bar, send the file with XMLHttpRequest to a route handler that streams it to disk, then let a server action save the record. Below: the route, the progress helper, a plain progress bar with Cancel, the free Upload Dropzone wired to the same helper, the size limits to raise, and Hold to Delete for removing an uploaded file.

Hold to Delete, preview

By buying you agree to the Terms.

Ready forCursorv0Lovableshadcn CLI

Full product pageReact · Tailwind · TypeScript