From 3e1677c18a2c423f0088bf107528938d77471259 Mon Sep 17 00:00:00 2001 From: Zephyrrus Date: Wed, 1 Jul 2020 20:13:34 +0300 Subject: fix: remove .bmp from the imageExtensions because sharp doesn't support it Trying to generate a thumb would throw a not supported exception, which would crash newer node.js versions because the process (on older version, it would only throw a UnhandledPromiseRejectionWarning) --- src/api/utils/Util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/api/utils/Util.js') diff --git a/src/api/utils/Util.js b/src/api/utils/Util.js index c37297a..07c295d 100644 --- a/src/api/utils/Util.js +++ b/src/api/utils/Util.js @@ -21,7 +21,7 @@ const ffmpeg = require('fluent-ffmpeg'); const Zip = require('adm-zip'); const uuidv4 = require('uuid/v4'); -const imageExtensions = ['.jpg', '.jpeg', '.bmp', '.gif', '.png', '.webp']; +const imageExtensions = ['.jpg', '.jpeg', '.gif', '.png', '.webp']; const videoExtensions = ['.webm', '.mp4', '.wmv', '.avi', '.mov']; const blockedExtensions = process.env.BLOCKED_EXTENSIONS.split(','); -- cgit v1.2.3