mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(Gmail Node): Fix sending attachments when filesystem mode is used (#3396)
This commit is contained in:
@@ -336,9 +336,10 @@ export class Gmail implements INodeType {
|
|||||||
for (const binaryProperty of (property as string).split(',')) {
|
for (const binaryProperty of (property as string).split(',')) {
|
||||||
if (items[i].binary![binaryProperty] !== undefined) {
|
if (items[i].binary![binaryProperty] !== undefined) {
|
||||||
const binaryData = items[i].binary![binaryProperty];
|
const binaryData = items[i].binary![binaryProperty];
|
||||||
|
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
||||||
attachmentsBinary.push({
|
attachmentsBinary.push({
|
||||||
name: binaryData.fileName || 'unknown',
|
name: binaryData.fileName || 'unknown',
|
||||||
content: binaryData.data,
|
content: binaryDataBuffer,
|
||||||
type: binaryData.mimeType,
|
type: binaryData.mimeType,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -422,9 +423,10 @@ export class Gmail implements INodeType {
|
|||||||
for (const binaryProperty of (property as string).split(',')) {
|
for (const binaryProperty of (property as string).split(',')) {
|
||||||
if (items[i].binary![binaryProperty] !== undefined) {
|
if (items[i].binary![binaryProperty] !== undefined) {
|
||||||
const binaryData = items[i].binary![binaryProperty];
|
const binaryData = items[i].binary![binaryProperty];
|
||||||
|
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
||||||
attachmentsBinary.push({
|
attachmentsBinary.push({
|
||||||
name: binaryData.fileName || 'unknown',
|
name: binaryData.fileName || 'unknown',
|
||||||
content: binaryData.data,
|
content: binaryDataBuffer,
|
||||||
type: binaryData.mimeType,
|
type: binaryData.mimeType,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -644,9 +646,10 @@ export class Gmail implements INodeType {
|
|||||||
for (const binaryProperty of (property as string).split(',')) {
|
for (const binaryProperty of (property as string).split(',')) {
|
||||||
if (items[i].binary![binaryProperty] !== undefined) {
|
if (items[i].binary![binaryProperty] !== undefined) {
|
||||||
const binaryData = items[i].binary![binaryProperty];
|
const binaryData = items[i].binary![binaryProperty];
|
||||||
|
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
||||||
attachmentsBinary.push({
|
attachmentsBinary.push({
|
||||||
name: binaryData.fileName || 'unknown',
|
name: binaryData.fileName || 'unknown',
|
||||||
content: binaryData.data,
|
content: binaryDataBuffer,
|
||||||
type: binaryData.mimeType,
|
type: binaryData.mimeType,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user