mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 20:54:07 -08:00
Remove executeSingle from ReadBinaryFile node
This commit is contained in:
parent
46d1a5fe58
commit
8d119852f6
|
@ -134,7 +134,7 @@ export class EmailSend implements INodeType {
|
||||||
for (let itemIndex = 0; itemIndex < length; itemIndex++) {
|
for (let itemIndex = 0; itemIndex < length; itemIndex++) {
|
||||||
|
|
||||||
item = items[itemIndex];
|
item = items[itemIndex];
|
||||||
console.log(item,itemIndex)
|
|
||||||
const fromEmail = this.getNodeParameter('fromEmail', itemIndex) as string;
|
const fromEmail = this.getNodeParameter('fromEmail', itemIndex) as string;
|
||||||
const toEmail = this.getNodeParameter('toEmail', itemIndex) as string;
|
const toEmail = this.getNodeParameter('toEmail', itemIndex) as string;
|
||||||
const ccEmail = this.getNodeParameter('ccEmail', itemIndex) as string;
|
const ccEmail = this.getNodeParameter('ccEmail', itemIndex) as string;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { IExecuteSingleFunctions } from 'n8n-core';
|
import { IExecuteFunctions } from 'n8n-core';
|
||||||
import {
|
import {
|
||||||
INodeExecutionData,
|
INodeExecutionData,
|
||||||
INodeType,
|
INodeType,
|
||||||
|
@ -49,11 +49,17 @@ export class ReadBinaryFile implements INodeType {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
async executeSingle(this: IExecuteSingleFunctions): Promise<INodeExecutionData> {
|
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||||
const item = this.getInputData();
|
const items = this.getInputData();
|
||||||
|
|
||||||
const dataPropertyName = this.getNodeParameter('dataPropertyName') as string;
|
const returnData: INodeExecutionData[] = [];
|
||||||
const filePath = this.getNodeParameter('filePath') as string;
|
const length = items.length as unknown as number;
|
||||||
|
let item: INodeExecutionData;
|
||||||
|
|
||||||
|
for (let itemIndex = 0; itemIndex < length; itemIndex++) {
|
||||||
|
item = items[itemIndex];
|
||||||
|
const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex) as string;
|
||||||
|
const filePath = this.getNodeParameter('filePath', itemIndex) as string;
|
||||||
|
|
||||||
let data;
|
let data;
|
||||||
try {
|
try {
|
||||||
|
@ -79,8 +85,10 @@ export class ReadBinaryFile implements INodeType {
|
||||||
}
|
}
|
||||||
|
|
||||||
newItem.binary![dataPropertyName] = await this.helpers.prepareBinaryData(data, filePath);
|
newItem.binary![dataPropertyName] = await this.helpers.prepareBinaryData(data, filePath);
|
||||||
|
returnData.push(newItem);
|
||||||
|
}
|
||||||
|
|
||||||
return newItem;
|
return this.prepareOutputData(returnData);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue