We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cb15c9 commit 5718d79Copy full SHA for 5718d79
components/freshdesk/actions/download-attachment/download-attachment.mjs
@@ -51,13 +51,12 @@ export default {
51
});
52
const attachment = attachments.find(({ id }) => id === this.attachmentId);
53
54
- const resppnse = await axios($, {
+ const response = await axios($, {
55
url: attachment.attachment_url,
56
responseType: "arraybuffer",
57
58
59
- const rawcontent = resppnse.toString("base64");
60
- const buffer = Buffer.from(rawcontent, "base64");
+ const buffer = Buffer.from(response);
61
const downloadedFilepath = `/tmp/${attachment.name}`;
62
fs.writeFileSync(downloadedFilepath, buffer);
63
0 commit comments