Skip to content

Commit

Permalink
Convert S3 body to string
Browse files Browse the repository at this point in the history
  • Loading branch information
lpsinger committed Sep 3, 2023
1 parent bd2bec3 commit 9a5281b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,12 @@ exports.fetchMessage = function(data) {
return reject(
new Error("Error: Failed to load message body from S3."));
}
data.emailData = result.Body.toString();
return resolve(data);
result.Body.transformToString().then(
body => {
data.emailData = body;
resolve(data);
}
);
});
});
});
Expand Down

0 comments on commit 9a5281b

Please sign in to comment.