Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
config: add option for max pending media uploads
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Jun 9, 2023
1 parent d727cea commit 19a7e14
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/usage/configuration/config_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,17 @@ Example configuration:
media_store_path: "DATADIR/media_store"
```
---
### `max_pending_media_uploads`

How many *pending media uploads* can a given user have? A pending media upload
is a created MXC URI that (a) is not expired (the `unused_expires_at` timestamp
has not passed) and (b) the media has not yet been uploaded for. Defaults to 5.

Example configuration:
```yaml
max_pending_media_uploads: 5
```
---
### `unused_expiration_time`

How long to wait in milliseconds before expiring created media IDs. Defaults to
Expand Down
2 changes: 2 additions & 0 deletions synapse/config/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)
Expand Down

0 comments on commit 19a7e14

Please sign in to comment.