Hello,
I have a react app with this site id: c1c40b52-6ac2-425c-ad35-b8e61d32d4dc
and this is serverless function endpoint with this site id: 925f9b60-a694-47a1-b41a-d34bb0c156f7
I have an image upload api which uploads images to aws s3 endpoint.
When i upload an image from the react endpoint on the netlify deployment backend - i get an exios error of 413 for certain large files. There is no certainty in the size. For some 4 mb files it fails, for some 6mb files it passes. This does not fail on my local deployment.
I tried adding these limits to the middleware but with no luck:
const jsonParser = bodyParser.json({
limit: ‘10mb’
});
const urlEncoded = bodyParser.urlencoded({limit: ‘10mb’, extended: true});
The api is not called when the image is big - so tis not a failure from aws. Theres a step before that where this request is rejected.
Is there a netlify config that i need to update for this? I dont mind it failing with this error - but i want it to fail for an expected size. Where is this limit configured? Any pointers will help
THanks!