Closed clokep closed 11 months ago
Something like https://github.com/matrix-org/synapse-s3-storage-provider/issues/107 might be useful if you're interested in supporting this for the Client-Server API. Implementing it in Synapse proper seems out of scope?
This has two mostly unrelated changes to it:
/media/v3/download
over federation (falling back to/media/r0/download
)v3
endpoint, addallow_redirects
from MSC3860I tested this by setting up a server locally and doing:
Which had the following logs:
You can see it attempts to fetch the media from Beeper's homeserver, gets a redirect to a CDN and then fetches it from there instead.
In order to accomplish this I reworked the fetching of downloaded media to be more similar to other federation requests. You can compare the solid to the dotted line. The main goal of this was to add the fallback from v3 -> r0.
Fixes #15196, part of #15661.