File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,13 +42,20 @@ function makeMiddleware (setup) {
4242 var pendingWrites = new Counter ( )
4343 var uploadedFiles = [ ]
4444
45+ function requestError ( error ) {
46+ busboy . destroy ( error ) ;
47+ }
48+
4549 function done ( err ) {
4650 if ( isDone ) return
4751 isDone = true
4852
53+ req . removeListener ( 'error' , requestError )
4954 req . unpipe ( busboy )
5055 drainStream ( req )
51- busboy . removeAllListeners ( )
56+ process . nextTick ( function ( ) {
57+ busboy . removeAllListeners ( )
58+ } ) ;
5259
5360 onFinished ( req , function ( ) { next ( err ) } )
5461 }
@@ -174,6 +181,7 @@ function makeMiddleware (setup) {
174181 indicateDone ( )
175182 } )
176183
184+ req . on ( 'error' , requestError )
177185 req . pipe ( busboy )
178186 }
179187}
Original file line number Diff line number Diff line change 11{
2- "name" : " multer" ,
2+ "name" : " @bdb/ multer" ,
33 "description" : " Middleware for handling `multipart/form-data`." ,
44 "version" : " 1.4.4" ,
55 "contributors" : [
66 " Hage Yaapa <captain@hacksparrow.com> (http://www.hacksparrow.com)" ,
77 " Jaret Pfluger <https://github.com/jpfluger>" ,
8- " Linus Unnebäck <linus@folkdatorn.se>"
8+ " Linus Unnebäck <linus@folkdatorn.se>" ,
9+ " Didier Colens <dcolens@cisco.com>"
910 ],
1011 "license" : " MIT" ,
1112 "repository" : " expressjs/multer" ,
You can’t perform that action at this time.
0 commit comments