mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +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
|
|
@ -451,14 +451,14 @@ FS.HTTP.Handlers.Get = function (ref) {
|
|||
if(userAgent.indexOf('msie') >= 0 || userAgent.indexOf('trident') >= 0 || userAgent.indexOf('chrome') >= 0) {
|
||||
ref.filename = encodeURIComponent(ref.filename);
|
||||
} else if(userAgent.indexOf('firefox') >= 0) {
|
||||
ref.filename = new Buffer(ref.filename).toString('binary');
|
||||
ref.filename = new Buffer.alloc(ref.filename).toString('binary');
|
||||
} else {
|
||||
/* safari*/
|
||||
ref.filename = new Buffer(ref.filename).toString('binary');
|
||||
}
|
||||
ref.filename = new Buffer.alloc(ref.filename).toString('binary');
|
||||
}
|
||||
} catch (ex){
|
||||
ref.filename = 'tempfix';
|
||||
}
|
||||
}
|
||||
return originalHandler.call(this, ref);
|
||||
};
|
||||
// 221
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue