Before you wast any time : please note that this is a reference question , just in case some one needed it. but please feel free to correct me :)
so , im trying to use formidable (i know that it's so similar to bodyParser
and that i should be using body parser instead ! ) with express . the problem that it doesnt work at all .
here is simple part of my code (relevant part )
form.on('progress', function (bytesReceived, bytesExpected) {
console.log(bytesExpected);
console.log('progress ');
if (bytesReceived > options.maxPostSize) {
console.log('bla ');
req.connection.destroy();
}
}).on('end', finish).parse(req,function(err, fields, files) {
console.log(files);
});
now if i try to console.log
-> err , fields , or files
it doesnt work .
an the only event that is being emitted is progress .
bodyParser()
. Connect/Express usesformidable
formultipart
requests.