🎨 Use Buffer.from
This commit is contained in:
parent
1283c77518
commit
8a94ca5c42
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ exports.writeAttachmentData = (root) => {
|
|||
throw new TypeError('`arrayBuffer` must be an array buffer');
|
||||
}
|
||||
|
||||
const buffer = new Buffer(arrayBuffer);
|
||||
const buffer = Buffer.from(arrayBuffer);
|
||||
const path = Path.join(root, exports._getAttachmentPath());
|
||||
await FSE.ensureFile(path);
|
||||
await FSE.writeFile(path, buffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue