mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Try to fix Node 12 Buffer() deprecation errors.
Thanks to xet7 !
This commit is contained in:
parent
7efbf30af6
commit
9b905c2833
8 changed files with 147 additions and 217 deletions
|
|
@ -451,10 +451,10 @@ 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.alloc(ref.filename).toString('binary');
|
||||
ref.filename = Buffer.from(ref.filename).toString('binary');
|
||||
} else {
|
||||
/* safari*/
|
||||
ref.filename = new Buffer.alloc(ref.filename).toString('binary');
|
||||
ref.filename = Buffer.from(ref.filename).toString('binary');
|
||||
}
|
||||
} catch (ex){
|
||||
ref.filename = 'tempfix';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue