mirror of
https://github.com/wekan/wekan.git
synced 2026-02-01 14:11:48 +01:00
Change Buffer to Buffer.alloc on Node v12. Try to fix Snap.
This commit is contained in:
parent
5bece0dd1e
commit
e01f4dbf13
8 changed files with 29 additions and 24 deletions
|
|
@ -138,7 +138,7 @@ export class Exporter {
|
|||
// [Old] for attachments we only export IDs and absolute url to original doc
|
||||
// [New] Encode attachment to base64
|
||||
const getBase64Data = function(doc, callback) {
|
||||
let buffer = new Buffer(0);
|
||||
let buffer = new Buffer.alloc(0);
|
||||
// callback has the form function (err, res) {}
|
||||
const tmpFile = path.join(
|
||||
os.tmpdir(),
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ export class WekanCreator {
|
|||
});
|
||||
} else if (att.file) {
|
||||
file.attachData(
|
||||
new Buffer(att.file, 'base64'),
|
||||
new Buffer.alloc(att.file, 'base64'),
|
||||
{
|
||||
type: att.type,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue