mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
🐛 Binary data handling fixes (#2629)
* Update node airtable * Update nodenextcloud * Update node spreadsheet * Update node cortex, dropbox, editImage nodes * Update node emailSend * Update node ftp * Update node googleDrive * Update node googleDrive fix * Update node youtube * Update node htmlExtract * Update node linkedIn * Update node mailgun * Update node matrix * Update node pipedrive * Update node readPdf * Update node facebookGraphApi * Update node httpRequest * Update node nocoDB * Update node httpRequest, respondToWebhook * Update node signi4 * Update node slack * Update node zulip * cleanup * fix generic funcs * 🐛 Fix EditImage Node Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -5,7 +5,6 @@ import {
|
||||
import { IDataObject, NodeApiError, NodeOperationError, } from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
BINARY_ENCODING,
|
||||
IExecuteFunctions,
|
||||
IExecuteSingleFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
@@ -69,7 +68,7 @@ export async function matrixApiRequest(this: IExecuteFunctions | IExecuteSingleF
|
||||
}
|
||||
}
|
||||
|
||||
export async function handleMatrixCall(this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, item: IDataObject, index: number, resource: string, operation: string): Promise<any> { // tslint:disable-line:no-any
|
||||
export async function handleMatrixCall(this: IExecuteFunctions, item: IDataObject, index: number, resource: string, operation: string): Promise<any> { // tslint:disable-line:no-any
|
||||
|
||||
if (resource === 'account') {
|
||||
if (operation === 'me') {
|
||||
@@ -193,13 +192,12 @@ export async function handleMatrixCall(this: IExecuteFunctions | IExecuteSingleF
|
||||
throw new NodeOperationError(this.getNode(), `No binary data property "${binaryPropertyName}" does not exists on item!`);
|
||||
}
|
||||
|
||||
//@ts-ignore
|
||||
// @ts-ignore
|
||||
qs.filename = item.binary[binaryPropertyName].fileName;
|
||||
//@ts-ignore
|
||||
filename = item.binary[binaryPropertyName].fileName;
|
||||
|
||||
//@ts-ignore
|
||||
body = Buffer.from(item.binary[binaryPropertyName].data, BINARY_ENCODING);
|
||||
body = await this.helpers.getBinaryDataBuffer(index, binaryPropertyName);
|
||||
//@ts-ignore
|
||||
headers['Content-Type'] = item.binary[binaryPropertyName].mimeType;
|
||||
headers['accept'] = 'application/json,text/*;q=0.99';
|
||||
|
||||
Reference in New Issue
Block a user