I am using the Busboy to upload the form data which contains the file and some text fields.
Every thing is working fine i am able to get the post parameters and file.
How can i achieve this: First I need to process the fields data and save in Db and process the file and update in same record in DB.
The busboy is first process the file and then process the fields.
req.pipe(req.busboy);
req.busboy.on('file', function (fieldname, file, filename) {
console.log("Uploading: " + filename);
console.log("fieldname: "+fieldname);
});
req.busboy.on('field', function(fieldname, val, fieldnameTruncated, valTruncated) {
var jsondata = JSON.parse(val);
});
Any suggestions