refactor(core): Add more overloads for string-type node parameters (no-changelog) (#5101)

* refactor(core): Add more overloads for string-type node parameter (no-changelog)

continued from https://github.com/n8n-io/n8n/pull/4797

* include binaryPropertyOutput
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-01-06 15:09:32 +01:00
committed by GitHub
parent c97f3cad59
commit 1acc7fea89
53 changed files with 98 additions and 131 deletions

View File

@@ -61,9 +61,9 @@ export class ReadBinaryFile implements INodeType {
Object.assign(newItem.binary, item.binary);
}
const filePath = this.getNodeParameter('filePath', itemIndex) as string;
const filePath = this.getNodeParameter('filePath', itemIndex);
const stream = await this.helpers.createReadStream(filePath);
const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex) as string;
const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex);
newItem.binary![dataPropertyName] = await this.helpers.prepareBinaryData(stream, filePath);
returnData.push(newItem);
} catch (error) {