From 6ed00d2c88961e6f7043430353089092549f5ddd Mon Sep 17 00:00:00 2001 From: Oscar Bernal Date: Wed, 23 Dec 2015 09:15:44 -0500 Subject: [PATCH] added maxFieldsSize override to formidable limit --- lib/storage-service.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/storage-service.js b/lib/storage-service.js index a4e3e94..69ca90f 100644 --- a/lib/storage-service.js +++ b/lib/storage-service.js @@ -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); };