Skip to content

Commit

Permalink
Merge pull request #75 from threadstudios/master
Browse files Browse the repository at this point in the history
Add file.headers check to getFileInfo.type
  • Loading branch information
madhums committed Aug 10, 2014
2 parents 39d4067 + 8784452 commit 96dd2a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/imager.js
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ function getFileInfo (file, cb) {

var f = {
size: typeof(file) == 'string' ? fs.statSync(file).size : file.size,
type: typeof(file) == 'string' ? mime.lookup(file) : file.type || file.mimetype,
type: typeof(file) == 'string' ? mime.lookup(file) : file.type || file.mimetype || file.headers['content-type'],
name: typeof(file) == 'string' ? file.split('/')[file.split('/').length - 1] : file.name,
path: typeof(file) == 'string' ? file : file.path
};
Expand Down

0 comments on commit 96dd2a8

Please sign in to comment.