mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-13 16:14:07 -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(',')) {
|
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,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue