413 Error on Form Uploads over 6MB #10777
-
Hey everyone! Recently I've been getting a 413 Error on a form of mine, any time I upload anything over 6MB. Additionally, this only happens in Production, and not on my Local Machine. Would anyone happen to know why that is? If it helps, I'm deploying using Netlify, my database is hosted on Vercel, and I'm using AWS to handle the file upload. If anyone could help out, it would be greatly appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Has anyone ever had this issue? It's weird that it only happens in Production |
Beta Was this translation helpful? Give feedback.
-
The Netlify lambda function can only process a limited body size.
https://docs.netlify.com/functions/overview/#default-deployment-options You'll need to upload the file directly to AWS without passing the file through the serverless function. https://docs.aws.amazon.com/AmazonS3/latest/userguide/PresignedUrlUploadObject.html |
Beta Was this translation helpful? Give feedback.
-
Thank you for taking a look @s3812497, on the Netlify forums they were adamant that they don't surface a 413 error so this must be a coding issue. I had come across that same statement in the documentation. I really appreciate your help |
Beta Was this translation helpful? Give feedback.
The Netlify lambda function can only process a limited body size.
https://docs.netlify.com/functions/overview/#default-deployment-options
You'll need to upload the file directly to AWS without passing the file through the serverless function.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/PresignedUrlUploadObject.html