Originally published on gregale.dev . I build Gregale, so read this as a vendor's page. This post was written with AI assistance.
To fix Vercel’s 413 FUNCTION_PAYLOAD_TOO_LARGE on file uploads, send the file directly from the browser to storage. Have your Next.js route authenticate the user and issue a short-lived upload URL. Keep the file bytes out of your Vercel Function. If the file only needs storing, start with Vercel Blob client uploads . If your app needs a separate runtime to validate or process the file, keep Next.js on Vercel and run that work next to private storage.
Vercel documents a 4.5 MB default request-body limit . Eligible Node.js, Python and Bun Functions with Fluid Compute and Performance (4 GB) memory can opt in to a 20 MiB public beta using VERCEL_SUPPORT_LARGE_REQUEST_BODY=1 . An 8 MiB upload exceeds the default, not that opt-in limit.…