Repository navigation
Fixes
- Removed the default 1 MiB cap from streamed
downloadoperations, so normal PDFs, scans, archives, and other files can be saved to disk without per-command overrides. - Added optional
SEAFILE_MAX_DOWNLOAD_SIZEfor deployments that want an explicit on-disk download cap. - Kept
SEAFILE_MAX_READ_SIZEas the bounded in-memory limit for text, bytes, and base64 reads. - Added named-library profile support for the new download limit and documented the distinction.
Safety and correctness
- Downloads still stream through mode-
0600temporary files, validateContent-Length, calculate SHA-256 while writing, and publish atomically. - Explicit download limits still reject oversized responses and clean up temporary files without corrupting an existing destination.
- Path validation, same-origin download-link checks, token redaction, read-only mode, and MCP boundaries are unchanged.
Verification
- 259 tests passed with Ruff clean.
- Both wheel and source distribution passed
twine check. - A clean Python 3.14 virtual environment installed the wheel with the MCP extra and passed CLI, library-launcher, and package-version smoke tests.
- Live downloads succeeded for files of 1,485,615 bytes and 2,434,047 bytes that previously failed under the old default.
AGPL-3.0-only.