Newest version of formidable changes the default maximum file size to 2MB, which is way too low for anything. Make the limit configurable and set to 1GB by default.

This commit is contained in:
Simo Kinnunen
2018-03-14 13:45:28 +09:00
parent e9d03aeac3
commit 4ed5aaacdb
4 changed files with 20 additions and 2 deletions

View File

@@ -8,6 +8,12 @@ module.exports.builder = function(yargs) {
return yargs
.env('STF_STORAGE_TEMP')
.strict()
.option('max-file-size', {
describe: 'Maximum file size to allow for uploads. Note that nginx ' +
'may have a separate limit, meaning you should change both.'
, type: 'number'
, default: 1 * 1024 * 1024 * 1024
})
.option('port', {
alias: 'p'
, describe: 'The port to bind to.'
@@ -29,5 +35,6 @@ module.exports.handler = function(argv) {
return require('../../units/storage/temp')({
port: argv.port
, saveDir: argv.saveDir
, maxFileSize: argv.maxFileSize
})
}