Merge pull request #509 from pierreozoux/quick-fix

Makes the mime also work with upper case extension
This commit is contained in:
David Mehren 2020-11-13 17:17:47 +01:00 committed by GitHub
commit dcdb6c1f96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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':