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

Revert "Support MSC3916 by adding a federation `/download` endpoint" #17325

Closed anoadragon453 closed 3 months ago

anoadragon453 commented 3 months ago

Reverts element-hq/synapse#17172

This ended up causing an Exception when interacting with https://github.com/matrix-org/synapse-s3-storage-provider/

Click to view the traceback ``` File "synapse/http/server.py", line 332, in _async_render_wrapper callback_return = await self._async_render(request) File "synapse/http/server.py", line 544, in _async_render callback_return = await raw_callback_return File "synapse/rest/media/thumbnail_resource.py", line 94, in on_GET await self.thumbnail_provider.respond_local_thumbnail( File "synapse/media/thumbnailer.py", line 282, in respond_local_thumbnail await self._select_and_respond_with_thumbnail( File "synapse/media/thumbnailer.py", line 512, in _select_and_respond_with_thumbnail responder = await self.media_storage.fetch_media(file_info) File "synapse/media/media_storage.py", line 232, in fetch_media res: Any = await provider.fetch(path, file_info, media_info, federation) File "synapse/logging/opentracing.py", line 921, in _wrapper return await func(*args, **kwargs) File "synapse/media/storage_provider.py", line 152, in fetch self.backend.fetch(path, file_info, media_info, federation) TypeError: S3StorageProviderBackend.fetch() takes 3 positional arguments but 5 were given ```

Reverting for now to fix develop, with a fix coming later.

anoadragon453 commented 3 months ago

Merging and then cherry-picking to matrix-org-hotfixes.