From c8c2528fc20a35205e7e77a7d0ee71d030962680 Mon Sep 17 00:00:00 2001 From: Neur0toxine Date: Wed, 29 May 2024 20:32:21 +0300 Subject: [PATCH] increase default body limit --- README.md | 2 +- src/server.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e6aed53..c27be3b 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ You can change configuration using these environment variables: - `NUM_WORKERS` - can be used to change how many threads will be used to transcode incoming files. Default is equal to logical CPUs. - `TEMP_DIR` - this can be used to change which directory should be used to store incoming downloads and transcoding results. Useful if you want to use a Docker volume for this. Default is system temp directory (`/tmp` for Linux). - `LOG_LEVEL` - changes log verbosity, default is `info`. -- `MAX_BODY_SIZE` - changes max body size for `/enqueue`. Default is 100MB, maximum is 1GiB (which is still *a lot* for the multipart form). +- `MAX_BODY_SIZE` - changes max body size for `/enqueue` and max file size for `/enqueue_url`. Default is 1GB (`file` in `/enqueue` request has an upper limit of `1GiB`). - `RESULT_TTL_SEC` - sets result ttl in seconds, minimum 60 seconds. Default is 3600 (transcoding results are being kept and can be downloaded for an hour). - `FFMPEG_VERBOSE` - if set to `1` changes FFmpeg log level from quiet to trace. diff --git a/src/server.rs b/src/server.rs index 8e1670d..7566144 100644 --- a/src/server.rs +++ b/src/server.rs @@ -29,7 +29,7 @@ use tokio::fs::File; use tokio::io::AsyncReadExt; use tokio_util::io::ReaderStream; -const CONTENT_LENGTH_LIMIT: usize = 100 * 1024 * 1024; +const CONTENT_LENGTH_LIMIT: usize = 1024 * 1024 * 1024; // 1GB pub struct Server { thread_pool: Arc,