Maximum Body Size for Netlify Function Post

I am trying to upload an image to Cloudinary by way of a Netlify Function. I am sending the base64 encoded string representation of an image file from the browser to the serverless function. This call crashes occasionally when the max POST body size is exceeded (with a hi-res image).

Is there a formal limit in the documentation somewhere for how big the data in the POST body can be?

Hi James,

That’s a curious issue. I’ve checked with a colleague and we’ve seen functions accept up to 6mb files. That said, I think you might be more likely running into the function runtime limit of 10 seconds. Could you perhaps get the request-id of a request that failed as you described?

You can view here: [Support Guide] Netlify Support asked for the 'x-nf-request-id' header? What is it and how do I find it? in case you need some guidance on how to get that information.

1 Like

Thanks for the feedback! How would I go about finding the request-id?

Hi, @jamesqquick, the link sent has more information about how to find the x-nf-request-id header value: