mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
fix(Gmail Node): Fix sending attachments when filesystem mode is used (#3396)
This commit is contained in:
parent
b851289001
commit
3a09da92be
|
@ -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,
|
||||
});
|
||||
}
|
||||
|
@ -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,
|
||||
});
|
||||
}
|
||||
|
@ -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,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue