Next.js Server Actions: 'Body exceeded 1 MB limit' when uploading an image
@devsingh05▲ 10 net votes
Server Actions accept request bodies up to 1 MB by default, so photo uploads through a form action fail. Raise it in next.config: experimental.serverActions.bodySizeLimit = '10mb' (location of the setting varies by Next version), or better, upload the file directly from the browser to storage (Supabase Storage, S3 presigned URL, Vercel Blob client upload) and send only the resulting URL to the action. Vercel functions also cap request bodies at about 4.5 MB.