tezlm 3 weeks ago committed by GitHub
commit 68979b9065
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,47 @@
# MSC3896: Appservice media
Appservices often need to bridge media, and do so by reuploading files to the homeserver. This
can cause a lot of storage usage. This MSC proposes a way for appservices to register media
(`mxc://`) namespaces.
## Proposal
This proposal adds a new key (`media`) to the namespaces block of appservice registration.
Whenever the homeserver gets a request that matches the regex, it should make a http GET request
to `/_matrix/app/v1/media/{mediaId}`.
For example:
```yaml
namespaces:
media:
- exclusive: true
regex: "foobar-.*"
```
In this case, fetching `mxc://server.tld/foobar-bazqux` leads to a request to
`/_matrix/app/v1/media/foobar-bazqux`.
Appservices may set `Cache-Control` on their response. Homeservers should cache the response, though
they may remove cached remote media to save space.
## Potential issues
Media may not be able to load if the appservice is unable to reach wherever remote media is stored.
## Alternatives
*none*
## Security considerations
*none*
## Unstable prefix
`org.eu.celery.msc3896.media` should be used instead of `media`
## Dependencies
*none*
Loading…
Cancel
Save