From 55ac09b299cccadb02e2888af5ac12295caf8564 Mon Sep 17 00:00:00 2001 From: orenom Date: Fri, 7 May 2021 23:44:13 +0200 Subject: [PATCH] decode filenames so we do not end up with too long filenames --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index 5033058..723be99 100644 --- a/src/utils.js +++ b/src/utils.js @@ -205,7 +205,7 @@ module.exports = function(redis) { media_path = path.join(__dirname, '../media') } - const path_with_filename = `${media_path}${file_path}` + const path_with_filename = decodeURI(`${media_path}${file_path}`) let path_without_filename = path_with_filename.split('/') path_without_filename.pop() path_without_filename = path_without_filename.join('/')