Luân Tào
Luân Tào

Reputation: 11

How to get value name array for type file when use formidable?

<input type="file" class="smart-file" name="images[]" data-btn-class="btn-primary" data-field-type="bootstrap-file-filed" multiple>

`router.post('/introcpn',function(req,res){ var form = new formidable.IncomingForm(); form.parse(req, function (err, fields, file) { if(err) throw err;`` console.log(file.images) }) })

`

Upvotes: 0

Views: 1145

Answers (1)

Geo
Geo

Reputation: 26

You have to add the code manually in node_module/formidable/incoming_form.js :

https://github.com/node-formidable/formidable/pull/380/files

This one is not in the master. It will allow you to get value name array

Upvotes: 1

Related Questions