Add dedicated devmode for express-fileupload

This commit is contained in:
Leon Meier 2025-03-09 17:46:32 +01:00
parent 50ad684ad3
commit 66f0bebc9d
2 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,8 @@ const config = new ConfigManager(__path + '/config.json', true, {
http_port: 3000, http_port: 3000,
http_domain: 'example.org', http_domain: 'example.org',
http_enable_hsts: false, http_enable_hsts: false,
devmode: true devmode: true,
devmode_fileupload: true
});//, log.core); // Disabled due to Cyclic dependencies with log handler (specifically-> devmode for loglevel) });//, log.core); // Disabled due to Cyclic dependencies with log handler (specifically-> devmode for loglevel)
export default config; export default config;

View File

@ -78,7 +78,7 @@ if (!config.global.devmode) {
); // Add headers ); // Add headers
} }
app.use(fileUpload({ useTempFiles: false, debug: config.global.devmode })); app.use(fileUpload({ useTempFiles: false, debug: config.global.devmode_fileupload }));
app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json()); app.use(bodyParser.json());