mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
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:
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user