Comparing version 1.0.4 to 1.0.5
@@ -6,2 +6,10 @@ # Change log | ||
## 1.0.5 - 2015-09-19 | ||
- Bugfix: drain the stream before considering request done | ||
## 1.0.4 - 2015-09-19 | ||
- Bugfix: propagate all errors from busboy | ||
## 1.0.3 - 2015-08-06 | ||
@@ -8,0 +16,0 @@ |
var is = require('type-is') | ||
var Busboy = require('busboy') | ||
var extend = require('xtend') | ||
var onFinished = require('on-finished') | ||
var appendField = require('append-field') | ||
@@ -11,2 +12,6 @@ | ||
function drainStream (stream) { | ||
stream.on('readable', stream.read.bind(stream)) | ||
} | ||
function makeMiddleware (setup) { | ||
@@ -42,5 +47,8 @@ return function multerMiddleware (req, res, next) { | ||
isDone = true | ||
req.unpipe(busboy) | ||
drainStream(req) | ||
busboy.removeAllListeners() | ||
next(err) | ||
onFinished(req, function () { next(err) }) | ||
} | ||
@@ -47,0 +55,0 @@ |
{ | ||
"name": "multer", | ||
"description": "Middleware for handling `multipart/form-data`.", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"contributors": [ | ||
@@ -27,2 +27,3 @@ "Hage Yaapa <captain@hacksparrow.com> (http://www.hacksparrow.com)", | ||
"object-assign": "^3.0.0", | ||
"on-finished": "^2.3.0", | ||
"type-is": "^1.6.4", | ||
@@ -29,0 +30,0 @@ "xtend": "^4.0.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24057
386
8
+ Addedon-finished@^2.3.0
+ Addedee-first@1.1.1(transitive)
+ Addedon-finished@2.4.1(transitive)