@lfkz/formdo
v1.0.5
Published
This is an encapsulation package that processes the data submitted by the form.
Downloads
3
Readme
Describe
EN This is an encapsulation package that processes the data submitted by the form.(nodejs)
CN 这是一个对表单提交的数据进行处理的封装包。(nodejs)
Example
const formdo = require('@lfkz/formdo')
router.post('/', function (req, res, next) {
formdo({ uploadDir: __dirname + '/../public/dirname', keepExtensions: true, multiples: true }, req, () => {
// success function
console.log(formdo.getfiles())
console.log(formdo.getfields())
console.log(formdo.getformdatanames())
console.log(formdo.getfilesavenames())
console.log(formdo.getfilesavepaths())
res.send(formdo.getfilevisitpaths());
},(err) => {
// error function
})
});