Bug Description
When receiving a POST request with Content-Type: multipart/form-data containing both text fields and a file field (e.g., named 'mediaFile'), the Webhook node (v2) fails to include the expected binary property in its output JSON.
The node correctly parses the text fields into the body property, and the headers show the correct Content-Type and boundary. However, the binary property (which should contain the uploaded file data, accessible via the configured Field Name for Binary Data or the original field name) is completely missing from the output.
This causes downstream nodes (like AWS S3 configured to use Input Binary Field: mediaFile) to fail with the error: "This operation expects the node's input data to contain a binary file 'mediaFile', but none was found [item 0]".
This occurs even when the Webhook node is configured correctly according to documentation:
- HTTP Method: POST
- Authentication: None
- Respond: Using 'Respond to Webhook' Node
- Options:
Raw Body: OFF (Disabled)
Field Name for Binary Data: Tried setting to mediaFile (matching the form field name) AND tried removing this option entirely.
Response Headers: Configured for CORS (doesn't seem related to the binary parsing issue itself).
The frontend is confirmed to be sending the file correctly using FormData with the name 'mediaFile'. The issue seems to be specifically within the Webhook node's processing/parsing of the incoming multipart request stream on n8n Cloud.
To Reproduce
- Create a simple workflow: Webhook -> AWS S3 -> Respond to Webhook.
- Configure Webhook node:
- HTTP Method: POST
- Authentication: None
- Respond: Using 'Respond to Webhook' Node
- Options -> Add
Field Name for Binary Data, set Value to mediaFile
- Options -> Ensure
Raw Body option is NOT present or is toggled OFF.
- Options -> Add
Response Headers for necessary CORS (Access-Control-Allow-Origin, etc.).
- Configure AWS S3 node:
- Set valid Credentials, Bucket Name.
- Set
Input Binary Field to mediaFile.
- Set File Name expression (e.g.,
uploads/{{ $json.body.originalFilename }})
- Configure Respond to Webhook node (e.g., Respond With JSON, Code 200).
- Create a simple HTML form or use a frontend app (like React/Vue/etc.) to POST
multipart/form-data to the Webhook's Production URL. The form should include:
- A text input (e.g., name="originalFilename", value="test.mp4")
- A file input named exactly
mediaFile (<input type="file" name="mediaFile">).
- Activate the workflow.
- Submit the form with a file selected from the frontend.
- Check the failed execution log in n8n.
- Observe the Output of the Webhook node: The
binary property is missing.
- Observe the Input of the AWS S3 node: The
binary property is missing.
- Observe the Error of the AWS S3 node: "This operation expects the node's input data to contain a binary file 'mediaFile', but none was found [item 0]".
Expected behavior
The Webhook node's output JSON should contain a top-level binary property. Inside this binary property, there should be an object keyed by the name specified in the Field Name for Binary Data option (or the original form field name if that option is omitted), which in this case should be mediaFile. This binary.mediaFile object should contain the details and data of the uploaded file, allowing downstream nodes like AWS S3 to process it.
Example expected structure snippet within the output JSON:
"binary": {
"mediaFile": {
"fileName": "testimonial-2.mp4",
"mimeType": "video/mp4",
// ... other metadata + data reference
}
}
Operating System
windows 10
n8n Version
n8n Version : 1.89.2 (Cloud)
Node.js Version
Node.js Version : (Managed by n8n Cloud)
Database
SQLite (default)
Execution mode
main (default)
Bug Description
When receiving a POST request with
Content-Type: multipart/form-datacontaining both text fields and a file field (e.g., named 'mediaFile'), the Webhook node (v2) fails to include the expectedbinaryproperty in its output JSON.The node correctly parses the text fields into the
bodyproperty, and theheadersshow the correctContent-Typeand boundary. However, thebinaryproperty (which should contain the uploaded file data, accessible via the configuredField Name for Binary Dataor the original field name) is completely missing from the output.This causes downstream nodes (like AWS S3 configured to use
Input Binary Field: mediaFile) to fail with the error: "This operation expects the node's input data to contain a binary file 'mediaFile', but none was found [item 0]".This occurs even when the Webhook node is configured correctly according to documentation:
Raw Body: OFF (Disabled)Field Name for Binary Data: Tried setting tomediaFile(matching the form field name) AND tried removing this option entirely.Response Headers: Configured for CORS (doesn't seem related to the binary parsing issue itself).The frontend is confirmed to be sending the file correctly using FormData with the name 'mediaFile'. The issue seems to be specifically within the Webhook node's processing/parsing of the incoming multipart request stream on n8n Cloud.
To Reproduce
Field Name for Binary Data, set Value tomediaFileRaw Bodyoption is NOT present or is toggled OFF.Response Headersfor necessary CORS (Access-Control-Allow-Origin, etc.).Input Binary FieldtomediaFile.uploads/{{ $json.body.originalFilename }})multipart/form-datato the Webhook's Production URL. The form should include:mediaFile(<input type="file" name="mediaFile">).binaryproperty is missing.binaryproperty is missing.Expected behavior
The Webhook node's output JSON should contain a top-level
binaryproperty. Inside thisbinaryproperty, there should be an object keyed by the name specified in theField Name for Binary Dataoption (or the original form field name if that option is omitted), which in this case should bemediaFile. Thisbinary.mediaFileobject should contain the details and data of the uploaded file, allowing downstream nodes like AWS S3 to process it.Example expected structure snippet within the output JSON:
"binary": {
"mediaFile": {
"fileName": "testimonial-2.mp4",
"mimeType": "video/mp4",
// ... other metadata + data reference
}
}
Operating System
windows 10
n8n Version
n8n Version : 1.89.2 (Cloud)
Node.js Version
Node.js Version : (Managed by n8n Cloud)
Database
SQLite (default)
Execution mode
main (default)