Next.js Discord

Discord Forum

POST https://[my_url]/api/upload 413 (Payload Too Large)

Unanswered
Goldstripe sardinella posted this in #help-forum
Open in Discord
Avatar
Goldstripe sardinellaOP
Hi guys, I am currently trying to create an api path that allow user to upload files like a pitch deck. these files often have a file size between 5Mb to 10Mb. WHen it exceed 4Mb, I observe that I often have the error POST https://[my_url]/api/upload 413 (Payload Too Large) when trying to deploy to vercel (but not while developing). How can I overcome the issue? Thank you!

1 Reply

Avatar
Ray
the max body size on vercel is 4.5mb
read here if you need more than that
https://vercel.com/guides/how-to-bypass-vercel-body-size-limit-serverless-functions