Permalink
Browse files

Merge pull request #36 from genu/patch-1

Update to be compatible to with mime version 2.x
  • Loading branch information...
2 parents bd17ff3 + 2319daa commit 12ea1605394946f39441f7244cac21d63875e116 @mikeal committed Oct 10, 2017
Showing with 2 additions and 2 deletions.
  1. +2 −2 main.js
View
@@ -30,7 +30,7 @@ function File (options) {
this.buffering = true
- this.mimetype = options.mimetype || mime.lookup(this.path.slice(this.path.lastIndexOf('.')+1))
+ this.mimetype = options.mimetype || mime.getType(this.path.slice(this.path.lastIndexOf('.')+1))
var stopBuffering = function () {
self.buffering = false
@@ -152,7 +152,7 @@ function File (options) {
if (!err && stats.isDirectory()) {
self.path = path.join(self.path, self.index)
- self.mimetype = mime.lookup(self.path.slice(self.path.lastIndexOf('.')+1))
+ self.mimetype = mime.getType(self.path.slice(self.path.lastIndexOf('.')+1))
fs.stat(self.path, finish)
return
} else {

0 comments on commit 12ea160

Please sign in to comment.