I have been working on this problem for two days now, and I am stuck. I am using Node.js with Express, and I am trying to implement an upload form. Basically, I want the form to
Form.pause actually will prevent browser sending more data. Call below function did it for me:
var closeConnection = function(res, form){
try{
if (!res.ended){
form.onPart=null;
form.pause();
res.end();
res.ended = true;
}
}catch(e){console.log(e);}
}
Some time has passed and now you can use multer instead of formidable or multiparty. Multer has desired functionality built in.