mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
👕 Fix lint issue
This commit is contained in:
parent
dab82965a4
commit
11fb97223c
|
@ -167,7 +167,7 @@ export class JotFormTrigger implements INodeType {
|
||||||
const resolveData = this.getNodeParameter('resolveData', false) as boolean;
|
const resolveData = this.getNodeParameter('resolveData', false) as boolean;
|
||||||
const onlyAnswers = this.getNodeParameter('onlyAnswers', false) as boolean;
|
const onlyAnswers = this.getNodeParameter('onlyAnswers', false) as boolean;
|
||||||
|
|
||||||
const form = new formidable.IncomingForm();
|
const form = new formidable.IncomingForm({});
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
||||||
|
|
|
@ -404,7 +404,7 @@ export class Webhook implements INodeType {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const mimeType = headers['content-type'] || 'application/json';
|
const mimeType = headers['content-type'] || 'application/json';
|
||||||
if (mimeType.includes('multipart/form-data')) {
|
if (mimeType.includes('multipart/form-data')) {
|
||||||
const form = new formidable.IncomingForm();
|
const form = new formidable.IncomingForm({});
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
||||||
|
@ -427,7 +427,7 @@ export class Webhook implements INodeType {
|
||||||
binaryPropertyName = `${options.binaryPropertyName}${count}`;
|
binaryPropertyName = `${options.binaryPropertyName}${count}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const fileJson = (files[file] as formidable.File).toJSON() as IDataObject;
|
const fileJson = (files[file] as formidable.File).toJSON() as unknown as IDataObject;
|
||||||
const fileContent = await fs.promises.readFile((files[file] as formidable.File).path);
|
const fileContent = await fs.promises.readFile((files[file] as formidable.File).path);
|
||||||
|
|
||||||
returnItem.binary![binaryPropertyName] = await this.helpers.prepareBinaryData(Buffer.from(fileContent), fileJson.name as string, fileJson.type as string);
|
returnItem.binary![binaryPropertyName] = await this.helpers.prepareBinaryData(Buffer.from(fileContent), fileJson.name as string, fileJson.type as string);
|
||||||
|
|
Loading…
Reference in a new issue