add FLOWISE_FILE_SIZE_LIMIT variable

This commit is contained in:
chungyau97
2024-02-10 12:02:21 +08:00
parent 0154de4f93
commit e3c899230c
2 changed files with 4 additions and 2 deletions
+1
View File
@@ -20,6 +20,7 @@ PORT=3000
# FLOWISE_USERNAME=user # FLOWISE_USERNAME=user
# FLOWISE_PASSWORD=1234 # FLOWISE_PASSWORD=1234
# FLOWISE_SECRETKEY_OVERWRITE=myencryptionkey # FLOWISE_SECRETKEY_OVERWRITE=myencryptionkey
# FLOWISE_FILE_SIZE_LIMIT=50mb
# DEBUG=true # DEBUG=true
# LOG_LEVEL=debug (error | warn | info | verbose | debug) # LOG_LEVEL=debug (error | warn | info | verbose | debug)
# TOOL_FUNCTION_BUILTIN_DEP=crypto,fs # TOOL_FUNCTION_BUILTIN_DEP=crypto,fs
+3 -2
View File
@@ -120,8 +120,9 @@ export class App {
async config(socketIO?: Server) { async config(socketIO?: Server) {
// Limit is needed to allow sending/receiving base64 encoded string // Limit is needed to allow sending/receiving base64 encoded string
this.app.use(express.json({ limit: '50mb' })) const flowise_file_size_limit = process.env.FLOWISE_FILE_SIZE_LIMIT ?? '50mb'
this.app.use(express.urlencoded({ limit: '50mb', extended: true })) this.app.use(express.json({ limit: flowise_file_size_limit }))
this.app.use(express.urlencoded({ limit: flowise_file_size_limit, extended: true }))
if (process.env.NUMBER_OF_PROXIES && parseInt(process.env.NUMBER_OF_PROXIES) > 0) if (process.env.NUMBER_OF_PROXIES && parseInt(process.env.NUMBER_OF_PROXIES) > 0)
this.app.set('trust proxy', parseInt(process.env.NUMBER_OF_PROXIES)) this.app.set('trust proxy', parseInt(process.env.NUMBER_OF_PROXIES))