element-hq / element-hq/synapse
Media storage provider functionality is not documented
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
"Media storage providers" are external modules that can be used to store and fetch media from sources other than the local filesystem. One popular example is https://github.com/matrix-org/synapse-s3-storage-provider/, which allows you to store media on Amazon S3, and fetch it when requested.
The [Synapse documentation](https://github.com/element-hq/synapse/tree/develop/docs) doesn't mention this functionality at all currently, which makes it unclear to Synapse developers that it exists, and unknown to third-party developers that they can develop these things.
A media storage provider module must implement the [`StorageProvider` class](https://github.com/element-hq/synapse/blob/bd8d8865fba3d6c68c9a4d698f42549820fdf12c/synapse/media/storage_provider.py#L42) (`store_file` and `fetch_media`). Media storage providers installed into the Python environment [can be configured](https://element-hq.github.io/synapse/v1.106/usage/configuration/config_documentation.html#media_storage_providers) through Synapse's config file.
Contributor guide
Research direction
Start in the Synapse docs directory and read synapse/media/storage_provider.py, especially the StorageProvider class and its store_file and fetch_media methods. Check the existing media_storage_providers configuration documentation for placement and terminology. Done means developers can discover the provider functionality, understand how to implement a provider, and configure an installed module.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100