Added fileserver.upload.max_upload_size_mb setting

This commit is contained in:
allegroai 2024-06-20 17:58:33 +03:00
parent fcfc1e8998
commit dd0ecb712d
2 changed files with 8 additions and 0 deletions

View File

@ -10,6 +10,11 @@ delete {
allow_batch: true allow_batch: true
} }
upload {
# the max size in Mb of the upload contents in one upload call
max_upload_size_mb: 0
}
cors { cors {
origins: "*" origins: "*"
} }

View File

@ -35,6 +35,9 @@ app.config["UPLOAD_FOLDER"] = first(
app.config["SEND_FILE_MAX_AGE_DEFAULT"] = config.get( app.config["SEND_FILE_MAX_AGE_DEFAULT"] = config.get(
"fileserver.download.cache_timeout_sec", 5 * 60 "fileserver.download.cache_timeout_sec", 5 * 60
) )
if max_upload_size := config.get("fileserver.upload.max_upload_size_mb", None):
app.config["MAX_CONTENT_LENGTH"] = max_upload_size * 1024
auth_handler = AuthHandler.instance() auth_handler = AuthHandler.instance()