I am trying to upload multiple image using jquery plugin jQuery File Upload.
I have got in post request like this, when I upload image:
app.post('/upload',function(req,res){
var form = new formidable.IncomingForm(),
files = [],
fields = [];
form.on('field', function(field, value) {
console.log("field");
fields.push([field, value]);
});
form.on('file', function(field, file) {
console.log(file.name);
console.log(JSON.stringify(field));
files.push([field, file]);
});
form.on('end', function() {
console.log('done');
});
form.parse(req);
});
Even I could not get console message.
When I upload image, that request contain file like this:
files: { files: [ [Object] ] },
How to solve this?