From 40d429bd9c5e9f0b1ff3d36caa45364d34f839df Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Mon, 5 Feb 2024 15:48:50 +0000 Subject: [PATCH] fix /tmp/ prefix in lambda email attachment --- src/email-helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/email-helpers.js b/src/email-helpers.js index 05b80cf..7d0cd00 100644 --- a/src/email-helpers.js +++ b/src/email-helpers.js @@ -108,7 +108,7 @@ const getmailOptions = (url, sender, recipient, file, emailSubject, note, emailb cid: 'opensearch_logo_darkmode' }, { - filename: file, + filename: path.basename(file), path: file }], template: 'index', @@ -126,4 +126,4 @@ function deleteTemporaryImage(emailbody) { if (fs.existsSync(emailbody)) { fs.unlinkSync(emailbody); } -} \ No newline at end of file +}