From 1d28e2c043980033dd04a9f7798017501719f0e3 Mon Sep 17 00:00:00 2001 From: user Date: Tue, 12 Mar 2024 00:42:29 +0300 Subject: [PATCH] dev@locazia: fix content_type --- app/api/routes/node_storage.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/api/routes/node_storage.py b/app/api/routes/node_storage.py index ab57a38..11f3204 100644 --- a/app/api/routes/node_storage.py +++ b/app/api/routes/node_storage.py @@ -108,8 +108,7 @@ async def s_api_v1_storage_get(request, file_hash=None): async with aiofiles.open(file_path, "rb") as file: content_file_bin = await file.read() - accept_type = cid.accept_type or request.headers.get("Accept") - accept_type = accept_type or content.meta.get("content_type") + accept_type = cid.accept_type or content.meta.get("content_type") if accept_type: if accept_type == "application/json": return response.json(