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

Commit c13dc56

Browse files
committed
config: add option for how long to wait until media ID expires
1 parent 2691d29 commit c13dc56

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Diff for: docs/usage/configuration/config_documentation.md

+10
Original file line numberDiff line numberDiff line change
@@ -1764,6 +1764,16 @@ Example configuration:
17641764
media_store_path: "DATADIR/media_store"
17651765
```
17661766
---
1767+
### `unused_expiration_time`
1768+
1769+
How long to wait in milliseconds before expiring created media IDs when MSC2246
1770+
support is enabled. Defaults to "24h"
1771+
1772+
Example configuration:
1773+
```yaml
1774+
unused_expiration_time: "1h"
1775+
```
1776+
---
17671777
### `media_storage_providers`
17681778

17691779
Media storage providers allow media to be stored in different

Diff for: synapse/config/repository.py

+4
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ def read_config(self, config: JsonDict, **kwargs: Any) -> None:
141141
"prevent_media_downloads_from", []
142142
)
143143

144+
self.unused_expiration_time = self.parse_duration(
145+
config.get("unused_expiration_time", "24h")
146+
)
147+
144148
self.media_store_path = self.ensure_directory(
145149
config.get("media_store_path", "media_store")
146150
)

0 commit comments

Comments
 (0)