I’m trying to upload a .zip file from n8n to Dropbox using a Code node, but Dropbox always receives a file that is only 58 bytes in size — even though the original files are around 250 MB to 2 GB.
When I inspect the binary data inside n8n, I see:
items[0].binary.data.data → “filesystem-v2, 9 bytes”
So it looks like the binary content isn’t being read properly from the filesystem before upload.
Here is the workflow:
My reference for the code node:
Setup Details
-
n8n version: latest
-
Deployment: Docker (Windows 11 host)
-
Binary data mode: filesystem (
N8N_DEFAULT_BINARY_DATA_MODE=filesystem) -
Environment variables:
“N8N_FORMDATA_FILE_SIZE_MAX=8192”,
“N8N_RUNNERS_MAX_OLD_SPACE_SIZE=8192”,
“N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true”,
“N8N_DEFAULT_BINARY_DATA_MODE=filesystem”,
“N8N_PAYLOAD_SIZE_MAX=8192”,
“NODE_VERSION=22.19.0”,
“NODE_ENV=production”,
“N8N_RELEASE_TYPE=stable”,
“N8N_RUNNERS_TASK_TIMEOUT=600000”,
“N8N_RUNNERS_ENABLED=true”,
“NODE_OPTIONS=–max-old-space-size=8192”,
“N8N_BINARY_DATA_TTL=43200”,
“PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”,
“YARN_VERSION=1.22.22”,
“NODE_ICU_DATA=/usr/local/lib/node_modules/full-icu”,
“SHELL=/bin/sh”
What I suspect
It seems items[0].binary.data.data only contains a reference string (like “filesystem-v29 bytes”) instead of the actual file data. So when Buffer.from() runs, it’s only converting that short string, not the actual binary file.
How can I properly load the full binary file from n8n’s filesystem mode so the Code node sends the actual file bytes to Dropbox?