I want to upload a file to my Express application. I can access the uploaded file using request.files.MYFILE in a function uploadFile, but my problem is that uploadFile is called only when the file have been entirely uploaded so I can't -for example- get the amount of bytes received until the upload is finished.
Is there a way to manage multipart easily in express or should I use node-formidable directly ?
I don't think express supports it out of the box, but... You could modify connect/multipart module (http://www.senchalabs.org/connect/multipart.html) and add something like:
form.onPart = function(part) {
//
}
it should allow you to access stream (more info: https://github.com/felixge/node-formidable).