简体   繁体   English

使用强大时如何获取类型文件的值名称数组?

[英]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) }) }) `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) }) })

` `

You have to add the code manually in node_module/formidable/incoming_form.js:您必须在 node_module/formidable/incoming_form.js 中手动添加代码:

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

This one is not in the master.这个不在master里。 It will allow you to get value name array它将允许您获取值名称数组

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM