Skip to content

Commit

Permalink
Fix file endpoint crashing server
Browse files Browse the repository at this point in the history
Fix #759
  • Loading branch information
hhaidar committed Aug 4, 2017
1 parent 071f502 commit 318d2ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/files.js
Expand Up @@ -65,6 +65,10 @@ module.exports = function() {
return res.send(400);
}

if (!file) {
return res.send(404);
}

var isImage = [
'image/jpeg',
'image/png',
Expand Down

0 comments on commit 318d2ed

Please sign in to comment.