You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
matrix-spec-proposals/proposals/3896-appservice-media.md

1.1 KiB

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:

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