From ce415fcd7db59cdf117207944a2a75fdb8a644d0 Mon Sep 17 00:00:00 2001 From: tzwm Date: Thu, 7 Dec 2023 17:57:23 +0800 Subject: [PATCH] fix: wront content_type for collections#view --- __init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index 7e0a480..b4edbe8 100644 --- a/__init__.py +++ b/__init__.py @@ -193,9 +193,9 @@ async def api_view_collection(request): content_type = 'application/json' file_extension = os.path.splitext(filename)[1].lower() if file_extension in image_extensions: - content_type = f'image/{file_extension}' + content_type = f'image/{file_extension[1:]}' if file_extension in video_extensions: - content_type = f'video/{file_extension}' + content_type = f'video/{file_extension[1:]}' return web.Response( body=media_file,