413 Request Entity Too Large when uploading PDF via HTTP Webhook

Hi, I hope someone can help me out here :blush:

I’m using an HTTP Webhook node in n8n to receive PDF documents. I’m trying to upload a file that’s around 1.2 MB, but I’m getting the error:

413 Request Entity Too Large

From what I understand, the N8N_PAYLOAD_SIZE_MAX environment variable defaults to 16 MB, so a 1.2 MB file shouldn’t be a problem, right?

I’m not sure if I need to set something explicitly or if there’s another limitation somewhere (maybe nginx, Docker, etc?). Any guidance would be super appreciated :folded_hands:

Thanks in advance!

Hi @merarisosa, welcome to community!
Seems like it’s not coming from n8n, but likely coming from your nginx.
To solve this, add this code to your nginx configuration.

# set client body size to 100 MB #
client_max_body_size 100M;

If it helps, please mark my msg as solution, thanks!

2 Likes

Tnx !!! it works

1 Like

Glad to know, you’re welcome!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.