From 72c38749ca6ebc90f13a93516934b1363f74ddbf Mon Sep 17 00:00:00 2001 From: Crawl Date: Tue, 28 Mar 2017 07:44:31 +0200 Subject: [PATCH] Update uploadController.js --- controllers/uploadController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/uploadController.js b/controllers/uploadController.js index d9ca04e..0207253 100644 --- a/controllers/uploadController.js +++ b/controllers/uploadController.js @@ -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);