2
votes

I'm using https://github.com/felixge/node-formidable for uploading files with express.

Although it works well there is a problem: I have a form with 9 inputs of type="file" and if I select 3 pictures and submit the form, formidable creates 9 files in my upload directory with 6 of them zero bytes in size. How can I stop the 6 files from being created?

1

1 Answers

0
votes

Yes, I found this anomaly too. You can either drop and ignore files of zero bytes, or in your Html form upon submit check for those <input type='file'> with no files and do a jQuery remove().