From 917b5f8b835acda75bb21d76a0006cad9fb836e3 Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Mon, 19 Feb 2024 12:06:17 -0800 Subject: [PATCH] fix /tmp/ prefix in lambda email attachment (#60) --- 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 +}