N8N Webhook Upload limit when using Form-Data

Hi, I was looking into this topic again

and figured out that I was missing some important details. The file upload (if I upload that to a webhook) works as expected if the upload is done as binary file.

But if I upload the same file within a form I get a faster response from n8n (somehow as if the file is not uploaded at all) and the data in n8n is empty.

Here is the curl command I use to upload as form (where it does not work):

curl --location --request POST 'http://localhost:5678/webhook/ac0a5ed3-2af6-4b8b-b2bb-78b94ca3bd17' \
--header 'Authorization: Bearer vj2a9cd7cueyuovuli5gpa2' \
--form 'audio_file=@"/output.mp3"' \
--form 'transcribe="dummy"' \
--form 'summary="dummy"'

but if i do the same with the next statement the file gets uploaded without any problem.

curl --location --request POST 'http://localhost:5678/webhook/ac0a5ed3-2af6-4b8b-b2bb-78b94ca3bd17' \
--header 'Authorization: Bearer vj2a9cd7cueyuovuli5gpa2' \
--header 'Content-Type: audio/mpeg' \
--data-binary '@/output.mp3'

I’m using the latest n8n version (1.58.1) on a local enviroment without any proxy in docker. The command is as following:

docker volume create n8n_data

docker run -it --rm -e N8N_PAYLOAD_SIZE_MAX=500 -e N8N_LOG_LEVEL=debug --name n8n-latest -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n:latest

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Andreas_Pointner,

How big is the mp3 file? I have just given this a test with a 170MB dmg file and it appears to be working as expected.

Hi @Jon
Thanks for taking that into consideration.

170mb works just fine.
I’ve uploaded files up to 210mb without any problem.
But I get erros when trying to upload files (in forms) bigger than that.
My personal test file has a size of 260mb.

Hey @Andreas_Pointner,

Yeah that has done it, I will check to see if we have an option to increase that form-data is a bit different so the usual payload option may not work.

n8n uses formidable to parse form-data payloads, which defaults to 200MiB for max file size. The 210MB file that’s working for you is about 200MB.
This will be addressed here.
Once this change is merged, you’ll be able to set a higher limit for your n8n instance via an env variable.

1 Like

@netroy thank you very much for addressing that issue that quickly. That is amazing! Hope it will be in the next release, soon.

@Jon thanks for looking into it and solving it that quick.
Do you think it would be helpful for other community members to relate this thread in the one I mentioned before?

If you think so please feel free to do so. Thanks for your support!

New version [email protected] got released which includes the GitHub PR 10857.

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