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

Commit 19a7e14

Browse files
committed
config: add option for max pending media uploads
Signed-off-by: Sumner Evans <[email protected]>
1 parent d727cea commit 19a7e14

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/usage/configuration/config_documentation.md

+11
Original file line numberDiff line numberDiff line change
@@ -1764,6 +1764,17 @@ Example configuration:
17641764
media_store_path: "DATADIR/media_store"
17651765
```
17661766
---
1767+
### `max_pending_media_uploads`
1768+
1769+
How many *pending media uploads* can a given user have? A pending media upload
1770+
is a created MXC URI that (a) is not expired (the `unused_expires_at` timestamp
1771+
has not passed) and (b) the media has not yet been uploaded for. Defaults to 5.
1772+
1773+
Example configuration:
1774+
```yaml
1775+
max_pending_media_uploads: 5
1776+
```
1777+
---
17671778
### `unused_expiration_time`
17681779

17691780
How long to wait in milliseconds before expiring created media IDs. Defaults to

synapse/config/repository.py

+2
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ def read_config(self, config: JsonDict, **kwargs: Any) -> None:
145145
config.get("unused_expiration_time", "24h")
146146
)
147147

148+
self.max_pending_media_uploads = config.get("max_pending_media_uploads", 5)
149+
148150
self.media_store_path = self.ensure_directory(
149151
config.get("media_store_path", "media_store")
150152
)

0 commit comments

Comments
 (0)