multiparty w/ Expressjs 4.0.0.-rc2 possibly Bugged
moolen opened this issue · comments
Moritz Johner commented
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
Andrew Kelley commented
I looked into this. Everything seems fine. Please submit a test case to show exactly what is not working.
Moritz Johner commented
thank you for your time.
My authentication middleware caused trouble while being before multiparty in the middleware stack.