From 0068624cd68d7c3f1413f429b6174d95e879be5e Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 30 Aug 2024 08:12:30 +0000 Subject: [PATCH] add exception for upload when allow_legacy_media=false Signed-off-by: Jason Volk --- src/api/router.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/api/router.rs b/src/api/router.rs index 1e4a74649..94ec5571e 100644 --- a/src/api/router.rs +++ b/src/api/router.rs @@ -244,8 +244,12 @@ pub fn build(router: Router, server: &Server) -> Router { get(client::get_content_thumbnail_legacy_legacy_route), ); } else { - router = router.route("/_matrix/media/*path", any(legacy_media_disabled)); - router = router.route("/_matrix/media/v3/preview_url", any(redirect_legacy_preview)); + router = router + .route("/_matrix/media/v1/*path", any(legacy_media_disabled)) + .route("/_matrix/media/v3/config", any(legacy_media_disabled)) + .route("/_matrix/media/v3/download/*path", any(legacy_media_disabled)) + .route("/_matrix/media/v3/thumbnail/*path", any(legacy_media_disabled)) + .route("/_matrix/media/v3/preview_url", any(redirect_legacy_preview)); } router