From 19d35555bf740c97ccece282ee2b2d581b364afb Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 7 Aug 2026 20:30:54 -0700 Subject: [PATCH] document TUS max size and session expiry flags --- TUS-Resumable-Uploads.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/TUS-Resumable-Uploads.md b/TUS-Resumable-Uploads.md index 3c5c51a..c709e55 100644 --- a/TUS-Resumable-Uploads.md +++ b/TUS-Resumable-Uploads.md @@ -11,7 +11,13 @@ SeaweedFS supports the [TUS](https://tus.io) protocol for resumable file uploads ## Configuration -TUS is enabled by default at the `/.tus` endpoint. You can customize or disable TUS using the `-tusBasePath` flag: +TUS is enabled by default at the `/.tus` endpoint. + +| Filer flag | Server flag | Default | Description | +|------------|-------------|---------|-------------| +| `-tusBasePath` | `-filer.tusBasePath` | `/.tus` | Endpoint base path; set to empty to disable TUS | +| `-tusMaxSizeMB` | `-filer.tusMaxSizeMB` | `5120` | Maximum upload size in MB | +| `-tusSessionExpiry` | `-filer.tusSessionExpiry` | `24h` | Incomplete upload sessions are cleaned up after this duration, e.g. `48h`, `7h30m` | ### Filer Command @@ -22,13 +28,16 @@ weed filer -master=localhost:9333 # Custom path weed filer -master=localhost:9333 -tusBasePath=uploads/tus +# 20GB max upload, keep incomplete sessions for 3 days +weed filer -master=localhost:9333 -tusMaxSizeMB=20480 -tusSessionExpiry=72h + # Disable TUS weed filer -master=localhost:9333 -tusBasePath= ``` ### Server Command -When using `weed server`, use the `-filer.tusBasePath` option: +When using `weed server`, use the `-filer.`-prefixed options: ```bash # Default: TUS enabled at /.tus @@ -37,6 +46,9 @@ weed server -filer=true # Custom path weed server -filer=true -filer.tusBasePath=uploads/tus +# 20GB max upload, keep incomplete sessions for 3 days +weed server -filer=true -filer.tusMaxSizeMB=20480 -filer.tusSessionExpiry=72h + # Disable TUS weed server -filer=true -filer.tusBasePath= ``` @@ -255,8 +267,8 @@ func main() { ## Limitations -- Maximum upload size: 5GB (configurable) -- Session expiration: 24 hours (configurable) +- Maximum upload size: 5GB by default, configurable with `-tusMaxSizeMB` +- Session expiration: 24 hours by default, configurable with `-tusSessionExpiry`; expired sessions are removed by an hourly background cleanup - Only single-file uploads (no concatenation extension) ## See Also