From 5c83be18a8398030c1723cbef76b74d6b1f7d069 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Fri, 25 Dec 2020 22:59:22 +0100 Subject: [PATCH] :bug: Fix issue that binary data got reused --- packages/nodes-base/nodes/HttpRequest.node.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/nodes-base/nodes/HttpRequest.node.ts b/packages/nodes-base/nodes/HttpRequest.node.ts index e0bfacdef3..b6e0198ee2 100644 --- a/packages/nodes-base/nodes/HttpRequest.node.ts +++ b/packages/nodes-base/nodes/HttpRequest.node.ts @@ -927,7 +927,7 @@ export class HttpRequest implements INodeType { newItem.binary![dataPropertyName] = await this.helpers.prepareBinaryData(response!, fileName); } - items[itemIndex] = newItem; + returnItems.push(newItem); } else if (responseFormat === 'string') { const dataPropertyName = this.getNodeParameter('dataPropertyName', 0) as string; @@ -980,12 +980,6 @@ export class HttpRequest implements INodeType { } } - if (responseFormat === 'file') { - // For file downloads the files get attached to the existing items - return this.prepareOutputData(items); - } else { - // For all other ones does the output items get replaced - return this.prepareOutputData(returnItems); - } + return this.prepareOutputData(returnItems); } }