n8n Form Trigger not providing base64 (data) of uploaded file in binary output
Hi everyone,
I’m encountering an issue with the Form Trigger node in n8n when handling uploaded files.
Context:
-
I’m using the Form Trigger node to let users upload an image (e.g., product or avatar).
-
The form successfully collects the file.
-
The output from the trigger node includes a
binaryfield with:fileNamemimeTypefileSizefileExtension
However, the binary object does not contain the data field, which is supposed to hold the base64-encoded file contents, as described in the n8n documentation:
"binary": {
"Product_Image": {
"data": "...", ← ❗ This is missing
"mimeType": "image/png",
"fileExtension": "png",
"fileName": "example.png"
}
}
Even though the image can be viewed/downloaded from the UI preview, the data is never present in the $binary.Product_Image.data field when accessed from a Set or Function node. This results in errors like:
Binary data was not loaded. Try using this in a node that requires it.
What I Tried:
- Accessing
$binary["Product_Image"].datain aFunctionnode → returnsundefined. - Using a
Setnode to reference base64 → same result. - Tried
Move Binary Datato duplicate → still nodata.
The only time the data field appears is after uploading or downloading a file via Google Drive or HTTP — but not directly from a Form Trigger upload.
Expected Behavior:
When a file is uploaded via the form, the binary object should include the data field (base64-encoded), or there should be a documented method to materialize it reliably.
Questions:
- Is this expected behavior (lazy-loaded binary)?
- Is there a proper way to “force” loading base64
datafrom the form-uploaded file without uploading/downloading again? - Could this be improved in future versions of the Form Trigger node?
Thanks in advance!