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:
@@ -126,11 +126,7 @@ export async function downloadRecordAttachments(this: IExecuteFunctions | IPollF
|
||||
if (record.fields[fieldName] !== undefined) {
|
||||
for (const [index, attachment] of (record.fields[fieldName] as IAttachment[]).entries()) {
|
||||
const file = await apiRequest.call(this, 'GET', '', {}, {}, attachment.url, { json: false, encoding: null });
|
||||
element.binary![`${fieldName}_${index}`] = {
|
||||
data: Buffer.from(file).toString('base64'),
|
||||
fileName: attachment.filename,
|
||||
mimeType: attachment.type,
|
||||
};
|
||||
element.binary![`${fieldName}_${index}`] = await this.helpers.prepareBinaryData(Buffer.from(file), attachment.filename, attachment.type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user