Receiving an Uploaded File in n8n: the Form Trigger File Field or a Webhook (multipart/form-data)
By Clément Lacaille (Tech-Bharat) · Published 22 September 2026 · updated 2 December 2026 · 8 min read · how we build and test
Files and Binary Data — €29
PDF guide in English on this topic · 29 pages · November 2026 edition · 14-day guarantee
It's a familiar scenario: an HTML form with an <input type="file"> field posts to an n8n Webhook, the execution shows up fine in the editor — but the node's Binary tab stays stubbornly empty, or the file appears under an unexpected key like file0. Nothing is broken server-side: it's the mechanics of multipart/form-data, different from a plain JSON body, that aren't configured the way n8n expects. The short answer: if the form can live inside n8n, add a File field to the Form Trigger and read the file from the Binary tab under that field's name; if the form already exists elsewhere, send it as multipart/form-data to a Webhook node. This guide covers both, what the Binary Property field does, and the traps behind most "empty file" reports on n8n.

Form Trigger: adding a File field step by step
The quickest way to receive a file is to let n8n host the form. In the Form Trigger node, add a form element and set its Element Type to File (the other types are text, textarea, number, email, dropdown, checkboxes, radio buttons, date, password, hidden field and custom HTML, according to the official Form Trigger documentation). Two options are specific to this type, as defined in the node's source code:
- Multiple Files: on by default, lets the visitor select several files in the same field. Turn it off if the workflow expects exactly one document.
- Accepted File Types: a comma-separated list of extensions (for example
.pdf, .png); empty means every type is allowed.
Where the file shows up. After a submission, the Form Trigger output has the file in its Binary tab. In the node's submission code, the binary key is the field name (on current versions of the node; older versions used the field label), with every non-alphanumeric character replaced by _: a field named id document becomes $binary.id_document. When several files arrive in the same field, they are numbered id_document_0, id_document_1, and so on; the JSON side lists each file's name, MIME type and size. Downstream nodes reference the file by that key, for example in the Input Binary Field of an Extract From File node.
Test URL or Production URL. The form has two addresses. The Test URL only listens after you click Execute step or Execute workflow, and the submission then appears in the editor; the Production URL only works once the workflow is saved and published, and its executions appear in the Executions tab, not on the canvas. A file sent to the Test URL while nothing is listening never reaches the workflow: that is the most common "my upload disappeared" case with the Form Trigger.
Accepted File Types is not a security check. In the source code, the list is passed to the form's file input, which filters the browser's file picker; the code that processes the submission does not check it again. Anyone can post another file type to the form URL directly, so validate the file in the workflow (see below). The total size of the files of one submission falls under the same N8N_FORMDATA_FILE_SIZE_MAX limit as a multipart Webhook, as detailed in our guide to large files and binary data.
Webhook: JSON vs. multipart/form-data
When the file comes from a website, an application or a script you don't edit from n8n, the Webhook node is the right choice, and the rest of this guide covers it. A typical n8n Webhook receives a JSON body (Content-Type: application/json), read directly into $json. A file upload from an HTML <form> or a JavaScript FormData() object takes a different path: the request is encoded as multipart/form-data, a format that splits the body into several blocks separated by a boundary — one block per text field, one block per binary file, each with its own Content-Disposition: form-data; name="..." header.
n8n tells the two apart automatically: the form's text fields land in $json.body, and each file lands in $binary, under a key that by default mirrors the name of the matching HTML <input>. A form with <input type="file" name="id_document"> will therefore produce a $binary.id_document accessible in downstream nodes — provided the request is actually sent as multipart, not as JSON with the file hand-encoded as base64 (a common mistake when the form is built with fetch() without going through a FormData object).
Binary Property: useful for one file, tricky for several
In the Webhook node's options, the Binary Property field (called Field Name for Binary Data in n8n 2.x) replaces the HTML field names with a prefix of your choice, followed by a number. Tested on n8n 2.46.4 with the prefix upload, a single file arrived as upload0, not upload: an expression written for $binary.upload finds nothing.
The trap shows up with several file fields in the same form (for example id_document and proof_of_address for an onboarding case). If you set the option, every received file becomes upload0, upload1, etc. — you lose the link between each file and its original field, and with two files in a files[] field the numbering did not even follow the order sent. The right move in that case: leave the option empty. Each file then stays available under its exact HTML field name ($binary.id_document, $binary.proof_of_address), with no extra handling needed.

Test before wiring up a real form
Before connecting a production form, validate the setup with curl, which builds a correct multipart/form-data request with no extra effort:
curl -X POST https://your-instance.n8n.cloud/webhook/upload-test \
-F "id_document=@invoice.pdf" \
-F "comment=Test upload"
The Webhook node should then show comment in $json.body and id_document in the Binary tab, with its size, MIME type (fileType) and original filename (fileName) already filled in by n8n. Our guide to testing n8n webhooks locally shows how to reproduce this test without exposing a public URL, using the editor's test URL.
Common pitfalls and error messages
- Empty file despite a request that looks correct: check the browser's Network tab to confirm the
Content-Typesent is actuallymultipart/form-data; boundary=..., notapplication/json. A JavaScriptFormData()object builds thisContent-Typeautomatically — never set it manually on your request's headers, or theboundarydisappears and n8n can no longer split the body. - 413 error or a truncated file: the files exceed
N8N_FORMDATA_FILE_SIZE_MAX(200 MiB by default in self-hosted, counted on the total of the files of one request: two files of 100 MiB passed, 100 + 190 MiB were refused on n8n 2.46.4) or your n8n Cloud plan's specific limit.N8N_PAYLOAD_SIZE_MAXdoes not apply to multipart uploads. Our guide to large files and binary data covers this variable and the related memory behavior; our dedicated article on the 413 error covers the case of plain JSON payloads. - Signature verification failing after an upload: if your webhook also needs to verify an HMAC signature (a Stripe or GitHub webhook, for instance), the raw body needed for the signature calculation generally isn't available the same way in multipart as it is in JSON. That scenario is beyond a simple form; our guide to securing n8n webhooks covers the options for this more advanced case.
What to do with the file once received
Once the binary is available under its $binary key, it flows like any other n8n file: an HTTP Request node can relay it to Google Drive, S3 or a CRM, a dedicated node can archive it, or — a common case for a client file — it can feed a document-ingestion pipeline directly. That's exactly what the PDF Ingestion to Supabase pgvector workflow does in the RAG Assistant Pack (€119): a client drops a PDF through a web form, and the document is chunked, embedded and made searchable with no manual step. The same principle applies to the attachments of an audit case, handled by the logging workflow in the Compliance & Audit Pack (€149).
Before processing the file, validate it instead of trusting it: the size in bytes ($binary.id_document.bytes), the extension of the file name, and the first bytes of the content. mimeType, fileExtension and fileType only repeat what the client declared: a PNG renamed scan.exe was recorded with fileExtension png. A recent study by Chen, Li, Pan, Lu, Chen and Ji, "URadar: Discovering Unrestricted File Upload Vulnerabilities via Adaptive Dynamic Testing" (IEEE Transactions on Information Forensics and Security, 2024 — see the study), found 26 vulnerabilities that let an attacker upload an executable file, across 18 real-world web applications tested. The lesson transposes directly to a publicly exposed n8n workflow: never execute, interpret, or serve back as-is a file received through a webhook without checking its actual type, and restrict accepted extensions to what the workflow can genuinely handle.
Our PDF guide Files and Binary Data runs this check end to end on n8n 2.46.4 (size in an IF, name, first bytes in a Code node, 422 and 415 answers), along with the upload limits and the error each one really returns, the memory cost of each binary data mode measured with files up to 190 MiB, and what to do with the file next: return it, zip it, resize it, archive it to S3.
Webhook or Form Trigger: which to pick
If the form doesn't need to exist anywhere outside n8n, the Form Trigger node makes handling an upload noticeably simpler: form rendering, required fields and binary handling are all native, with no manual multipart configuration (see the File field section above). The Webhook remains the right choice whenever the file comes from a form or application that already exists and that you don't control from the n8n editor — a marketing site, an internal application, or the kind of integration covered in our complete guide to the Webhook node.
Key takeaways
With the Form Trigger, add a File field and read the file from the Binary tab under the field name, from the Production URL once the workflow is published. A file upload to an n8n Webhook follows mechanics quite distinct from a plain JSON webhook: multipart/form-data separates text fields from files, and each file lands in $binary under its HTML field name — unless you force a single key via Binary Property, which breaks that mapping as soon as there's more than one file. Always test with curl -F before wiring up a real form, watch the size limits, and validate the received file (actual type, extension, size) before passing it further down the workflow.
FAQ
Frequently asked questions
Why does my n8n Webhook node's Binary tab stay empty after a file upload?
The most common cause: the form isn't actually sending the request as multipart/form-data (for example a fetch() call that posts JSON with the file base64-encoded instead of a real FormData object), or the request's Content-Type doesn't match what n8n expects. Check the browser's Network tab to confirm the request's Content-Type starts with multipart/form-data; boundary=... and that the body contains one block per field, including the file.
What does the Webhook node's "Binary Property" field actually do?
It sets a prefix, and n8n numbers every received file after it: set to upload, even a single file arrives as upload0, and several files as upload0, upload1 and so on, whatever their HTML field names (checked on n8n 2.46.4, where the option is called Field Name for Binary Data). With two files sent in a files[] field, the numbering did not follow the order sent. Leave it empty to keep each file under its HTML field name.
Should the received file be validated before processing?
Yes, always: its size in bytes ($binary.<key>.bytes), the extension of its file name, and its first bytes. The mimeType, fileExtension and fileType that n8n records all come from the Content-Type the client declared, so they can be forged — that is precisely the mechanism documented by security research into unrestricted file upload vulnerabilities.
How do I add a file upload field to the n8n Form Trigger?
Add a form element and set its Element Type to File. Two options appear: Multiple Files (on by default) and Accepted File Types, a comma-separated list of extensions such as .pdf, .png (empty = every type). The file lands in the Binary tab under the field name, with non-alphanumeric characters replaced by an underscore; several files in the same field are numbered field_0, field_1 and so on.
Why does my Form Trigger file upload never reach the workflow?
Check which URL the form was opened from. The Test URL only listens after you click Execute step or Execute workflow in the editor; the Production URL only works once the workflow is saved and published, and its executions then appear in the Executions tab, not on the canvas.
Does Accepted File Types block other files on the server side?
Do not count on it. In n8n's Form Trigger source code, the list is passed to the form's file input, which filters the browser's file picker; the code that processes the submission does not check it again. Check the extension, the size and the first bytes of the file in the workflow itself.