I am trying to pass a binary array (multiple files) to Stirling PDF. I understand from other posts that the HTTP node cannot do this, but that it can be done using javascript in a Code node. Does anyone have the javascript code that I can drop in to make this work?
Hi @Poking6559 take a look at this solution to split the binary files without using the code node
Thanks a bunch for the suggestion. Unfortunately, it seems as if it is still passing only one file to Stirling. Here is my setup. My apologies for all the screenshots as I do not know how to export a workflow
can you remove the pinned data at the start node and try again?
Unpinned and ran it again, but the result was the same
I see in HTTP node that you’re using merge-pdfs ednpoint, maybe it’s designed to output only 1
i am confused!
It definitely is supposed to only output one file. The issue is that the HTTP node is only sending Stirling PDF one file instead of 2. So, I only get back the file that was sent without the other file merged with it because Stirling did not receive the second file.
I understand now,
Actually, you don’t need the Split node. Instead, use the Aggregate node and configure it like this:
This will output a single-item array of binary data.
Then, connect the HTTP node and set it up like this (I haven’t tested this yet):
I tried that :). Unfortunately, Stirling PDF requires the files to be passed in one input field that is an array of binaries. It seems like it be so simple to accomplish but it is driving me mad
It’s actually an array of binary.
If you’re comfortable sharing the workflow, I can look into it more deeply…