Hello good folks,
I am trying to upload multiple files at once, from Node-RED to another server, using the HTTP Request Node. The documentation explains the payload structure required to attach a single file:
{
"KEY": {
"value": FILE_CONTENTS,
"options": {
"filename": "FILENAME"
}
}
}
This works when I need to upload a single file, but what about multiple files?
Here's the architecture of my system:
- SERVER 1 submits, through a single HTTP request, one or more files to Node-RED
- Node-RED captures these files with the HTTP In node and forwards them to SERVER 2 using the HTTP Request node. All files must be embedded into that single HTTP Request.
- SERVER 2 processes the files and responds with a summary of the processing information to Node-Red
- Node-RED then simply sends back the response to SERVER 1
I unfortunately have no control over either SERVER 1 or SERVER 2, so I cannot change the way they send/process files.
So in summary, I need all files received as a group to be forwarded as a group to the destination server so it can aggregate data pulled from all attachments it receives in a single transaction.
Judging from the JSON structure above, this isn't possible. Are there alternatives to the HTTP Request node for this specific use case?
Thanks