Commit 2196906a authored by Vytor Calixto's avatar Vytor Calixto 👾
Browse files

Corrigido bug ao fazer upload de .jpeg

parent d6e1920b
......@@ -17,9 +17,11 @@ var storage = multer.diskStorage({
var fileFilter = function(req, file, cb) {
console.log(file.mimetype)
if(file.mimetype === 'image/jpg' ||
file.mimetype === 'image/jpeg' ||
file.mimetype === 'image/png' ||
file.mimetype === 'application/pdf') {
cb(null, true)
return
}
var err = new Error('Invalid file')
err.status = 400
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment