Closed
Description
Context
- node version: 12.14.1
- module (formidable) version: canary
- environment (e.g. node, browser, native, OS): Nodenv, Chrome, WSL2, Win10 Pro
- used with (i.e. popular names of modules): express, mysql
- any other relevant information: -
What problem are you trying to solve?
I have a problem with using formidable, it's a simple but I can't find any site with this problem.
"In case I have a upload webapp with formidable, how not to upload an empty file? It always upload an empty file, title like upload_3f0934128511fd38dha1.... and no content"
I'm using this module like below in expressJS
router.post('/compose', async function (req, res, next) {
if (req.body.imgFile == undefined ) { // no upload }
else {
form.parse(req, async (err, fields, files) => {
// some business logic
}
}
but it doesn't work anyway. I think form.parse()
has no option to not upload.
So if form.parse() in formidable
has a function to make webapp upload or not, plz comment below. Or same function with same feature, plz comment
thx
Metadata
Metadata
Assignees
Labels
No labels