Skip to content

MSC3860: Media Download Redirects #3860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 9, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions proposals/3860-media-download-redirect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# MSC3860: Media Download Redirects

Currently the media download endpoints must return either a 200 with content or error responses. This means the media server instance must stream the data from wherever it is stored, which is likely not local to itself. Allowing redirects on these endpoints would
make it possible for the media repo to tell clients/servers to pull data direct from the source, eg. a CDN.

## Proposal

This MSC simply proposes that a 307 redirect code is allowed and followed according to the `Location` header. It is possible some clients would already follow these which needs to be confirmed. Specifc endpoints in question:

+ `/_matrix/media/v3/download/{serverName}/{mediaId}`
+ `/_matrix/media/v3/download/{serverName}/{mediaId}/{fileName}`
+ `/_matrix/media/v3/thumbnail/{serverName}/{mediaId}`