Skip to content

Commit

Permalink
fix(Gmail Node): Fix sending attachments when filesystem mode is used (
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-radency authored May 30, 2022
1 parent b851289 commit 3a09da9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/nodes-base/nodes/Google/Gmail/Gmail.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,10 @@ export class Gmail implements INodeType {
for (const binaryProperty of (property as string).split(',')) {
if (items[i].binary![binaryProperty] !== undefined) {
const binaryData = items[i].binary![binaryProperty];
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
attachmentsBinary.push({
name: binaryData.fileName || 'unknown',
content: binaryData.data,
content: binaryDataBuffer,
type: binaryData.mimeType,
});
}
Expand Down Expand Up @@ -422,9 +423,10 @@ export class Gmail implements INodeType {
for (const binaryProperty of (property as string).split(',')) {
if (items[i].binary![binaryProperty] !== undefined) {
const binaryData = items[i].binary![binaryProperty];
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
attachmentsBinary.push({
name: binaryData.fileName || 'unknown',
content: binaryData.data,
content: binaryDataBuffer,
type: binaryData.mimeType,
});
}
Expand Down Expand Up @@ -644,9 +646,10 @@ export class Gmail implements INodeType {
for (const binaryProperty of (property as string).split(',')) {
if (items[i].binary![binaryProperty] !== undefined) {
const binaryData = items[i].binary![binaryProperty];
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
attachmentsBinary.push({
name: binaryData.fileName || 'unknown',
content: binaryData.data,
content: binaryDataBuffer,
type: binaryData.mimeType,
});
}
Expand Down

0 comments on commit 3a09da9

Please sign in to comment.