Skip to content

Webhook node missing 'binary' property in output for multipart/form-data file uploads (v1.89.2 Cloud) #14876

Description

@Deloradev

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

  1. Create a simple workflow: Webhook -> AWS S3 -> Respond to Webhook.
  2. 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.).
  3. 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 }})
  4. Configure Respond to Webhook node (e.g., Respond With JSON, Code 200).
  5. 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">).
  6. Activate the workflow.
  7. Submit the form with a file selected from the frontend.
  8. Check the failed execution log in n8n.
  9. Observe the Output of the Webhook node: The binary property is missing.
  10. Observe the Input of the AWS S3 node: The binary property is missing.
  11. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleIssue was stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions