summaryrefslogtreecommitdiffstats
path: root/fix-download-unicode/cfs_access-point.txt
diff options
context:
space:
mode:
authorRomulus Tsai 蔡仲明 <urakagi@gmail.com>2020-05-08 09:35:11 +0800
committerRomulus Tsai 蔡仲明 <urakagi@gmail.com>2020-05-08 09:35:11 +0800
commitcfcc73724fcd394150d1b815d0a7a4c466e216b5 (patch)
treea9648255f14cd8b0e1ad8eee1f8d42337a0668bc /fix-download-unicode/cfs_access-point.txt
parenta3658993128bdddd5d40f792c19281dc5eac51f5 (diff)
parent533bc045d06269dba2f42cdfe61817a1b3407974 (diff)
downloadwekan-cfcc73724fcd394150d1b815d0a7a4c466e216b5.tar.gz
wekan-cfcc73724fcd394150d1b815d0a7a4c466e216b5.tar.bz2
wekan-cfcc73724fcd394150d1b815d0a7a4c466e216b5.zip
Merge branch 'master' of https://github.com/wekan/wekan
Diffstat (limited to 'fix-download-unicode/cfs_access-point.txt')
-rw-r--r--fix-download-unicode/cfs_access-point.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/fix-download-unicode/cfs_access-point.txt b/fix-download-unicode/cfs_access-point.txt
index 8e3359d0..de1c6c76 100644
--- a/fix-download-unicode/cfs_access-point.txt
+++ b/fix-download-unicode/cfs_access-point.txt
@@ -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 = Buffer.from(ref.filename).toString('binary');
} else {
/* safari*/
- ref.filename = new Buffer(ref.filename).toString('binary');
- }
+ ref.filename = Buffer.from(ref.filename).toString('binary');
+ }
} catch (ex){
ref.filename = 'tempfix';
- }
+ }
return originalHandler.call(this, ref);
};
// 221