Binary Data not passing through

Code nodes have to set up a sandbox to run, which can slow things down, so you might prefer to use a Split Out node. The “secret” to making this work is to specify $binary (again, that’s the “fixed”, literal value, not an expression) as the Fields to Split Out parameter value.

Then, since the name of the binary is still different in each split out item/object, reference the name of it (e.g. in the Upload node’s Input Data Field Name) with an expression (this time not a fixed, literal value) like: {{ $binary.keys()[0] }}. Likewise, since there will only be one binary in each item/object, you can also reference attributes of the binary using index zero [0] with expressions like {{ $binary.values()[0].fileName }}, {{ $binary.values()[0].fileType }} or {{ $binary.values()[0].mimeType }}

2 Likes