fix(Sendgrid Node): Fix issue sending attachments (#3213)

This commit is contained in:
Ricardo Espinoza 2022-04-28 11:39:38 -04:00 committed by GitHub
parent 8d9e05e3c3
commit 2b008815ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -456,8 +456,10 @@ export class SendGrid implements INodeType {
const binaryProperty = items[i].binary![property]; const binaryProperty = items[i].binary![property];
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, property);
attachmentsToSend.push({ attachmentsToSend.push({
content: binaryProperty.data, content: dataBuffer.toString('base64'),
filename: binaryProperty.fileName || 'unknown', filename: binaryProperty.fileName || 'unknown',
type: binaryProperty.mimeType, type: binaryProperty.mimeType,
}); });