Skip to content

Commit

Permalink
Fixed base64 encoding issue
Browse files Browse the repository at this point in the history
  • Loading branch information
GTFalcao committed Aug 1, 2024
1 parent 196a720 commit f02fbbb
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ export default {
/* eslint-enable no-unused-vars */

const body = filePathOrContent.includes("tmp/")
? fs.createReadStream(filePathOrContent, {
encoding: "base64",
})
? (await fs.promises.readFile(filePathOrContent)).toString("base64")
: filePathOrContent;

const response = await salesforce.createRecord("Attachment", {
Expand Down

0 comments on commit f02fbbb

Please sign in to comment.