node-formidable / formidable

The most used, flexible, fast and streaming parser for multipart form data. Supports uploading to serverless environments, AWS S3, Azure, GCP or the filesystem. Used in production.
MIT License
7.06k stars 683 forks source link

maxFileSize Config? #38

Closed rootslab closed 13 years ago

rootslab commented 13 years ago

...

felixge commented 13 years ago

Seems like you removed the content of this issue (original title was "MaxFieldsSize doesn't seems to work!! "). So I guess this means you want me to close it.

rootslab commented 13 years ago

Sorry for that, I have confused the meaning of maxFieldsSize. However, I have a little question for you:
It is possible to stop upload streaming and file creation when the data uploaded exceeded a maxFileSize config options ? P.S. Why did you choose to not pass a config object to IncomingForm({uploadDir:..,encoding:..}) instead of rewriting variables for all instances created? ( a simple ..apply(this,arguments) function in the constructor, like ExtJs Ext.apply, (link here) instead of var form = new IncomingForm(), form.uploadDir = ...; form.encoding=...). Thanks for your attention and have a good job!