added maxFieldsSize override to formidable limit
This commit is contained in:
parent
24cd1a619e
commit
6ed00d2c88
|
@ -40,6 +40,9 @@ function StorageService(options) {
|
|||
if (options.maxFileSize) {
|
||||
this.maxFileSize = options.maxFileSize;
|
||||
}
|
||||
if (options.maxFieldsSize) {
|
||||
this.maxFieldsSize = options.maxFieldsSize;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -236,6 +239,9 @@ StorageService.prototype.upload = function(req, res, options, cb) {
|
|||
if (this.maxFileSize && !options.maxFileSize) {
|
||||
options.maxFileSize = this.maxFileSize;
|
||||
}
|
||||
if (this.maxFieldsSize && !options.maxFieldsSize) {
|
||||
options.maxFieldsSize = this.maxFieldsSize;
|
||||
}
|
||||
return handler.upload(this.client, req, res, options, cb);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue