expressjs / connect-multiparty

connect middleware for multiparty

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multiparty w/ Expressjs 4.0.0.-rc2 possibly Bugged

moolen opened this issue · comments

What works:

// in my app.js
app.use(multiparty( opts ));
restComponent( app );  //the routes are initialized

What is not working:

// inside my routes/index.js
app.post('/post', ensureAuthenticated, multiparty( opts ), Post.create);

Symptomps:
the middleware never calls next()
the middleware never recieves any event: form.on('field') (or file, error)
the middleware recieves an error if the request is aborted:

Error: Request aborted
at IncomingMessage.onReqAborted (/node_modules/multiparty/index.js:146:17)
at IncomingMessage.EventEmitter.emit (events.js:92:17)

im using express v4.0.0-rc2
with connect-multiparty 1.0.3

I looked into this. Everything seems fine. Please submit a test case to show exactly what is not working.

thank you for your time.
My authentication middleware caused trouble while being before multiparty in the middleware stack.