Webhook multipart/form-data multiple files

Hi,
I tried send 3 files but node web hook received only 1 file. My command:

curl --location --request POST ‘http://localhost:5678/webhook-test/joinpdf’ --form ‘=@/tmp/1.pdf’ --form ‘=@/tmp/2.pdf’ --form ‘=@/tmp/3.pdf’

How to receive multiple files in the Webhook POST method?

The problem with your command is that you do not define the name of the parameter. That one goes before the “=”. That results in all having an empty name and so overwriting each other. If you change that and then run something like the following it will work fine:

curl --location --request POST "http://localhost:5678/webhook-test/joinpdf" --form "file1=@/tmp/1.pdf" --form "file2=@/tmp/2.pdf" --form "file3=@/tmp/3.pdf"