{"action":"opened","issue":{"url":"https://api.github.com/repos/expressjs/multer/issues/234","labels_url":"https://api.github.com/repos/expressjs/multer/issues/234/labels{/name}","comments_url":"https://api.github.com/repos/expressjs/multer/issues/234/comments","events_url":"https://api.github.com/repos/expressjs/multer/issues/234/events","html_url":"https://github.com/expressjs/multer/issues/234","id":108316407,"number":234,"title":"No err is generated when in using DiskStorage","user":{"login":"ersensen","id":1652123,"avatar_url":"https://avatars.githubusercontent.com/u/1652123?v=3","gravatar_id":"","url":"https://api.github.com/users/ersensen","html_url":"https://github.com/ersensen","followers_url":"https://api.github.com/users/ersensen/followers","following_url":"https://api.github.com/users/ersensen/following{/other_user}","gists_url":"https://api.github.com/users/ersensen/gists{/gist_id}","starred_url":"https://api.github.com/users/ersensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ersensen/subscriptions","organizations_url":"https://api.github.com/users/ersensen/orgs","repos_url":"https://api.github.com/users/ersensen/repos","events_url":"https://api.github.com/users/ersensen/events{/privacy}","received_events_url":"https://api.github.com/users/ersensen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-25T12:32:05Z","updated_at":"2015-09-25T12:32:05Z","closed_at":null,"body":"Hi,\r\n\r\nI want to handle upload errors. The code below works fine when MemoryStorage is used, that is when i dont set dest property. I can get the err object when i send oversized files or more then 2 files.\r\n\r\nBut when I uncomment dest property to use DiskStorage err object is undefined. It does not save any file to disk but no err is generated.\r\n\r\n// here is my multer options;\r\nvar multerOptions = {\t\r\n\tlimits: {\r\n\t\tfileSize: 1024 * 1024,\r\n\t\tfiles: 2\r\n  \t},\r\n\t//dest: './app/public/images'\r\n}\r\n\r\n// and here is my upload middleware\r\nvar imageUpload = multer(multerOptions).array('photos');\r\n\r\nrouter.post('/property-images', function (req, res, next) {\r\n\timageUpload(req, res, function (err) {\r\n\t\tif (err) {\r\n\t\t\treturn res.status(500).send(err.message);\r\n\t\t}\r\n\t\t\r\n\t\t// Everything went fine\r\n\t\tconsole.log(req.body) // form fields\r\n\t\tconsole.log(req.files) // form files\r\n\t\tres.status(200).send(req.files);\t\r\n        }\r\n}"}}