diff --git a/synapse/config/repository.py b/synapse/config/repository.py index dba9926779ba..839c026d70d7 100644 --- a/synapse/config/repository.py +++ b/synapse/config/repository.py @@ -145,6 +145,8 @@ def read_config(self, config: JsonDict, **kwargs: Any) -> None: config.get("unused_expiration_time", "24h") ) + self.max_pending_media_uploads = config.get("max_pending_media_uploads", 5) + self.media_store_path = self.ensure_directory( config.get("media_store_path", "media_store") ) diff --git a/synapse/media/media_repository.py b/synapse/media/media_repository.py index 0682709596eb..6d1c065633ba 100644 --- a/synapse/media/media_repository.py +++ b/synapse/media/media_repository.py @@ -80,6 +80,7 @@ def __init__(self, hs: "HomeServer"): self.max_upload_size = hs.config.media.max_upload_size self.max_image_pixels = hs.config.media.max_image_pixels self.unused_expiration_time = hs.config.media.unused_expiration_time + self.max_pending_media_uploads = hs.config.media.max_pending_media_uploads Thumbnailer.set_limits(self.max_image_pixels)