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

Commit

Permalink
config: add option for how long to wait until media ID expires
Browse files Browse the repository at this point in the history
  • Loading branch information
sumnerevans committed Aug 14, 2023
1 parent 10514eb commit 76c9748
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/usage/configuration/config_documentation.md
Expand Up @@ -1805,6 +1805,16 @@ Example configuration:
media_store_path: "DATADIR/media_store"
```
---
### `unused_expiration_time`

How long to wait in milliseconds before expiring created media IDs. Defaults to
"24h"

Example configuration:
```yaml
unused_expiration_time: "1h"
```
---
### `media_storage_providers`

Media storage providers allow media to be stored in different
Expand Down
4 changes: 4 additions & 0 deletions synapse/config/repository.py
Expand Up @@ -141,6 +141,10 @@ def read_config(self, config: JsonDict, **kwargs: Any) -> None:
"prevent_media_downloads_from", []
)

self.unused_expiration_time = self.parse_duration(
config.get("unused_expiration_time", "24h")
)

self.media_store_path = self.ensure_directory(
config.get("media_store_path", "media_store")
)
Expand Down

0 comments on commit 76c9748

Please sign in to comment.