mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-19 01:31:34 +00:00
Update uploadController.js
This commit is contained in:
parent
3e38e138ca
commit
72c38749ca
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user