I have been working on this problem for two days now, and I am stuck. I am using Node.js with Express, and I am trying to implement an upload form. Basically, I want the form to
I dont know if the thread is still waiting for a answer but in case that is, you can prevent file upload in formidable by setting form.maxFileSize to zero. If the codition are meet, he will send a error event saying that the maxFileSize exceeded.
fileUpload = false
form = new require("formidable").IncommingForm()
if(fileUpload)
//Do stuff here
else
form.maxFileSize = 0