Skip to content

Commit

Permalink
fix(FTP Node): Use filename instead of remote filepath for downloaded…
Browse files Browse the repository at this point in the history
… binary data (#6170)
  • Loading branch information
netroy committed May 15, 2023
1 parent 4f16d74 commit 4993212
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/nodes-base/nodes/Ftp/Ftp.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -601,11 +601,11 @@ export class Ftp implements INodeType {
await sftp!.get(path, createWriteStream(binaryFile.path));

const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i);
const filePathDownload = this.getNodeParameter('path', i) as string;
const remoteFilePath = this.getNodeParameter('path', i) as string;

items[i].binary![dataPropertyNameDownload] = await this.nodeHelpers.copyBinaryFile(
binaryFile.path,
filePathDownload,
basename(remoteFilePath),
);

const executionData = this.helpers.constructExecutionMetaData(
Expand Down Expand Up @@ -697,11 +697,11 @@ export class Ftp implements INodeType {
await streamPipeline(stream, createWriteStream(binaryFile.path));

const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i);
const filePathDownload = this.getNodeParameter('path', i) as string;
const remoteFilePath = this.getNodeParameter('path', i) as string;

items[i].binary![dataPropertyNameDownload] = await this.nodeHelpers.copyBinaryFile(
binaryFile.path,
filePathDownload,
basename(remoteFilePath),
);

const executionData = this.helpers.constructExecutionMetaData(
Expand Down

0 comments on commit 4993212

Please sign in to comment.