summaryrefslogtreecommitdiffstats
path: root/fix-download-unicode
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-01-18 16:01:02 +0200
committerLauri Ojansivu <x@xet7.org>2020-01-18 16:01:02 +0200
commit9b905c2833d54cf34d1875148075b2bf756d943a (patch)
treea6c06bf2ac4c7ee1ddd4975ebcb3924c08afda98 /fix-download-unicode
parent7efbf30af62182f345f401b1e68e273199fc6939 (diff)
downloadwekan-9b905c2833d54cf34d1875148075b2bf756d943a.tar.gz
wekan-9b905c2833d54cf34d1875148075b2bf756d943a.tar.bz2
wekan-9b905c2833d54cf34d1875148075b2bf756d943a.zip
Try to fix Node 12 Buffer() deprecation errors.
Thanks to xet7 !
Diffstat (limited to 'fix-download-unicode')
-rw-r--r--fix-download-unicode/cfs_access-point.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/fix-download-unicode/cfs_access-point.txt b/fix-download-unicode/cfs_access-point.txt
index 145218df..de1c6c76 100644
--- a/fix-download-unicode/cfs_access-point.txt
+++ b/fix-download-unicode/cfs_access-point.txt
@@ -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';