You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Some of my workflows expect to receive multipart/form-data payloads that may contain a mixture of fields and files. When a file is received in a webhook body, the webhook node fails:
TypeError: Cannot set properties of undefined (setting 'file')
at Webhook.handleFormData (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Webhook/Webhook.node.js:210:55)
at Object.executeWebhook (/usr/local/lib/node_modules/n8n/dist/WebhookHelpers.js:215:33)
at /usr/local/lib/node_modules/n8n/dist/TestWebhooks.js:91:37
To Reproduce
Steps to reproduce the behavior:
Create a workflow with a single webhook trigger
Listen for test event
curl -v -X POST https://my.n8n.host/webhook-test/478238f3-8119-4b5d-83ab-fbb48bdbe157 -F [email protected] -F field=sometext
Expected behavior
Expected the following behavior as in 1.20.0:
Stock webhook trigger, binary data option on:
Fields are dropped from multipart/form-data body
Files are stored into binary item
Stock webhook trigger, binary data option off:
Fields are placed into $json.body
Files are stored into binary item
Environment (please complete the following information):
OS: Ubuntu 22.04.3
n8n Version: 1.21.0+
Node.js Version: 18.18.2
Database system SQLite
Operation mode: main
All tested versions were from the docker.n8n.io/n8nio/n8n repository
Additional context
It appears that n8n 1.20.0 is the last version to handle mixed-content multipart/form-data webhooks as expected.
Behavior in 1.21.x/1.22.x/1.23.x:
Stock webhook trigger, binary data option on:
Fields are dropped from multipart/form-data body
Files are stored into binary item
Stock webhook trigger, binary data option off:
ERROR: Cannot set properties of undefined (setting 'file')
The text was updated successfully, but these errors were encountered:
Describe the bug
Some of my workflows expect to receive multipart/form-data payloads that may contain a mixture of fields and files. When a file is received in a webhook body, the webhook node fails:
To Reproduce
Steps to reproduce the behavior:
curl -v -X POST https://my.n8n.host/webhook-test/478238f3-8119-4b5d-83ab-fbb48bdbe157 -F [email protected] -F field=sometext
Expected behavior
Expected the following behavior as in 1.20.0:
Stock webhook trigger, binary data option on:
Stock webhook trigger, binary data option off:
Environment (please complete the following information):
main
All tested versions were from the
docker.n8n.io/n8nio/n8n
repositoryAdditional context
It appears that n8n 1.20.0 is the last version to handle mixed-content multipart/form-data webhooks as expected.
Behavior in 1.21.x/1.22.x/1.23.x:
Stock webhook trigger, binary data option on:
Stock webhook trigger, binary data option off:
ERROR: Cannot set properties of undefined (setting 'file')
The text was updated successfully, but these errors were encountered: