diff options
author | Avi Flax | 2022-12-04 20:20:50 -0500 |
---|---|---|
committer | GitHub | 2022-12-04 18:20:50 -0700 |
commit | 4493eefb768dac16500a888d2e8b868b1457655f (patch) | |
tree | 60ec292f609f860369d6df401c04488a9e3669f3 /takahe | |
parent | 3f8045f4128d14558636b1c8a9445c29e8e1583d (diff) | |
download | takahe-4493eefb768dac16500a888d2e8b868b1457655f.tar.gz takahe-4493eefb768dac16500a888d2e8b868b1457655f.tar.bz2 takahe-4493eefb768dac16500a888d2e8b868b1457655f.zip |
Make max media upload size configurable
Diffstat (limited to 'takahe')
-rw-r--r-- | takahe/settings.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/takahe/settings.py b/takahe/settings.py index 15f30ee..89d4d3a 100644 --- a/takahe/settings.py +++ b/takahe/settings.py @@ -94,6 +94,11 @@ class Settings(BaseSettings): MEDIA_ROOT: str = str(BASE_DIR / "media") MEDIA_BACKEND: Optional[MediaBackendUrl] = None + #: Maximum filesize when uploading images. Increasing this may increase memory utilization + #: because all images with a dimension greater than 2000px are resized to meet that limit, which + #: is necessary for compatibility with Mastodon’s image proxy. + MEDIA_MAX_IMAGE_FILESIZE_MB: int = 10 + #: Request timeouts to use when talking to other servers Either #: float or tuple of floats for (connect, read, write, pool) REMOTE_TIMEOUT: float | tuple[float, float, float, float] = 5.0 |