mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -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));
|
await sftp!.get(path, createWriteStream(binaryFile.path));
|
||||||
|
|
||||||
const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i);
|
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(
|
items[i].binary![dataPropertyNameDownload] = await this.nodeHelpers.copyBinaryFile(
|
||||||
binaryFile.path,
|
binaryFile.path,
|
||||||
filePathDownload,
|
basename(remoteFilePath),
|
||||||
);
|
);
|
||||||
|
|
||||||
const executionData = this.helpers.constructExecutionMetaData(
|
const executionData = this.helpers.constructExecutionMetaData(
|
||||||
|
@ -697,11 +697,11 @@ export class Ftp implements INodeType {
|
||||||
await streamPipeline(stream, createWriteStream(binaryFile.path));
|
await streamPipeline(stream, createWriteStream(binaryFile.path));
|
||||||
|
|
||||||
const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i);
|
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(
|
items[i].binary![dataPropertyNameDownload] = await this.nodeHelpers.copyBinaryFile(
|
||||||
binaryFile.path,
|
binaryFile.path,
|
||||||
filePathDownload,
|
basename(remoteFilePath),
|
||||||
);
|
);
|
||||||
|
|
||||||
const executionData = this.helpers.constructExecutionMetaData(
|
const executionData = this.helpers.constructExecutionMetaData(
|
||||||
|
|
Loading…
Reference in a new issue