Preventing Payload too large error in NextJS
Unanswered
Fire ant posted this in #help-forum
Fire antOP
Hi, I have recently added an post api in next js 13's app router.
I am getting 413 on upload an 11 mb file. How do i increase the limit on vercel?
I am getting 413 on upload an 11 mb file. How do i increase the limit on vercel?
8 Replies
You can't, I think the maximum is 4.5 mb
also vercel isn't intended for file uploading
you need to upload your files to an external service like s3
by generating a presigned url
Fire antOP
cool
i was trying to validate a file
i think ill move it to a util
@Fire ant Hi, I have recently added an post api in next js 13's app router.
I am getting 413 on upload an 11 mb file. How do i increase the limit on vercel?
the max body size limit on vercel is 4.5mb, they have a article for this
https://vercel.com/guides/how-to-bypass-vercel-body-size-limit-serverless-functions
https://vercel.com/guides/how-to-bypass-vercel-body-size-limit-serverless-functions