Merge pull request #43 from EpikPhailure/patch-1

Update uploadController.js
This commit is contained in:
Kana 2017-06-23 02:38:38 +02:00 committed by GitHub
commit 0986f53000

View File

@ -23,7 +23,7 @@ const upload = multer({
limits: { fileSize: config.uploads.maxSize },
fileFilter: function(req, file, cb) {
if (config.blockedExtensions !== undefined) {
if (config.blockedExtensions.some(extension => path.extname(file.originalname) === extension)) {
if (config.blockedExtensions.some(extension => path.extname(file.originalname).toLowerCase() === extension)) {
return cb('This file extension is not allowed');
}
return cb(null, true);