element-hq / synapse

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

Add a wrapper to convert file streams to multipart #17327

Closed H-Shay closed 1 week ago

H-Shay commented 1 week ago

based on https://github.com/element-hq/synapse/compare/erikj/fixup_multipart

https://github.com/element-hq/synapse/pull/17172 changed the storage provider fetch API, which caused breakage in 3rd party storage providers. This PR fixes that by removing the change to the api, and adding a multipart file consumer which consumes a file stream and converts it to mulipart before streaming that out to the requester.