Update uploadController.js

This commit is contained in:
Crawl 2017-03-28 07:44:31 +02:00 committed by GitHub
parent 3e38e138ca
commit 72c38749ca
1 changed files with 1 additions and 1 deletions

View File

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