element-hq / element-hq/synapse

Documentation for media_storage_providers

Open
#7,140 0 comments 0 reactions 0 assignees View on GitHub
A-Docs A-Media-Repository T-Task Z-Help-Wanted
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#7140](https://github.com/matrix-org/synapse/issues/7140).

---

I want to use the `s3_storage_provider.S3StorageProviderBackend`.

I configured it and when images are send over my synapse server they are also stored in the s3 bucket.
Here is how i configured it:

```
media_storage_providers:
- module: s3_storage_provider.S3StorageProviderBackend
store_local: False
store_remote: True
store_synchronous: True
config:
bucket: synapse1
endpoint_url: $HIDDEN_ENDPOINT
access_key_id: $HIDDEN_KEY
secret_access_key: $HIDDEN_KEY
```

But the images are still also stored locally on disk at `/var/lib/matrix-synapse/media` and if i remove the folder `/var/lib/matrix-synapse/media` the images are not shown anymore although they are still in the s3 bucket. So it seems to me that the `s3_storage_provider.S3StorageProviderBackend` does nothing but also store the data as a backup option?

I also could not find any documentation about `media_storage_providers` in this repo.
Can someone explain what they are and how they are supposed to work please.

My use case is that i want only to use the S3 Bucket and no local storage. Is this possible with `media_storage_providers`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.