mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
fix(FTP Node): Use filename instead of remote filepath for downloaded binary data (#6170)
This commit is contained in:
parent
85a6ace56b
commit
be089331b3
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue