fix(FTP Node): Use filename instead of remote filepath for downloaded binary data (#6170)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-05-05 12:32:49 +00:00 committed by GitHub
parent 85a6ace56b
commit be089331b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(
@ -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(