element-hq / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://element-hq.github.io/synapse
GNU Affero General Public License v3.0
1.34k stars 161 forks source link

Re-introduce federation /download endpoint #17350

Closed H-Shay closed 3 months ago

H-Shay commented 3 months ago

This PR re-introduces the federation /download endpoint outlined in MSC3916 - the original PR for this was reverted in https://github.com/element-hq/synapse/pull/17325 due to an incompatibility with 3rd party storage providers.

This PR implements the multipart/mixed response by wrapping and transforming the file stream from the storage provider, thus eliminating the incompatibility.