this is a simple question… how can i use formidable instead bodyparser()…
how to configure in app.use
app.configure(function(){
app.set('port', process.env.PORT || 9000);
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.set('view options',{layout:false});
app.use(express.favicon());
app.use(express.bodyParser();
app.use(express.cookieParser('blocksecretpass'));
app.use(express.session());
im using expressjs 3 rc4 nodejs 0.8 formidable 1.0.11 on windows 7 64-bit
why i need?? because i have to post some files and bodyparser() shutdown my node app
this is the error
https://github.com/felixge/node-formidable/issues/34
https://github.com/felixge/node-formidable/issues/130
the solution to issues is app.use express.bodyparser before any other middleware that try to use async calls
tnx all
You’re already using formidable. Express is based on connect and the multipart middleware is based on formidable. Have a look at the express example to learn how to upload files.