element-hq / element-hq/synapse
media_filepath is not passed to storage providers
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
### Description
https://github.com/element-hq/synapse/blob/ab277b3e3ff6002536afbe29da268a52cf4cb0b6/synapse/media/media_storage.py#L206-L279
According to this implementation, the `media_filepath` is not passed to the storage providers as described in:
https://github.com/element-hq/synapse/blob/ab277b3e3ff6002536afbe29da268a52cf4cb0b6/synapse/media/storage_provider.py#L47-L54
This causes an issue when local storage is disabled, for example with https://github.com/matrix-org/synapse-s3-storage-provider/issues/162
### Steps to reproduce
- list the steps
- that reproduce the bug
- using hyphens as bullet points
### Homeserver
NOT RELEVANT
### Synapse Version
ab277b3e3ff6002536afbe29da268a52cf4cb0b6
### Installation Method
Other (please mention below)
### Database
NOT RELEVANT
### Workers
Single process
### Platform
NOT RELEVANT
### Configuration
NOT RELEVANT
### Relevant log output
```shell
NOT RELEVANT
```
### Anything else that would be useful to know?
I love usefull forms...
Contributor guide
Research direction
Start by reading synapse/media/media_storage.py at lines 206-279 and synapse/media/storage_provider.py at lines 47-54, then trace how storage providers are invoked. Done means the documented media_filepath reaches providers, including when local storage is disabled, with relevant tests passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100