1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 02:09:32 +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:
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

@ -83,7 +83,9 @@ module.exports = function(options) {
})
app.post('/s/upload/:plugin', function(req, res) {
var form = new formidable.IncomingForm()
var form = new formidable.IncomingForm({
maxFileSize: options.maxFileSize
})
if (options.saveDir) {
form.uploadDir = options.saveDir
}