From afc801b1c381ba3bee50af1357e9d26d8ccc3b7b Mon Sep 17 00:00:00 2001 From: pierreozoux Date: Tue, 29 Sep 2020 19:12:29 +0200 Subject: Makes the mime also work with upper case extension Signed-off-by: pierreozoux --- lib/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/utils.js') diff --git a/lib/utils.js b/lib/utils.js index 270cbd6a..23873ffc 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -7,7 +7,7 @@ exports.isSQLite = function isSQLite (sequelize) { exports.getImageMimeType = function getImageMimeType (imagePath) { var fileExtension = /[^.]+$/.exec(imagePath) - switch (fileExtension[0]) { + switch (fileExtension[0].toLowerCase()) { case 'bmp': return 'image/bmp' case 'gif': -- cgit v1.2.3