dev@locazia: fix content_type

This commit is contained in:
user 2024-03-12 00:42:29 +03:00
parent 8b380ebc4b
commit 1d28e2c043
1 changed files with 1 additions and 2 deletions

View File

@ -108,8 +108,7 @@ async def s_api_v1_storage_get(request, file_hash=None):
async with aiofiles.open(file_path, "rb") as file: async with aiofiles.open(file_path, "rb") as file:
content_file_bin = await file.read() content_file_bin = await file.read()
accept_type = cid.accept_type or request.headers.get("Accept") accept_type = cid.accept_type or content.meta.get("content_type")
accept_type = accept_type or content.meta.get("content_type")
if accept_type: if accept_type:
if accept_type == "application/json": if accept_type == "application/json":
return response.json( return response.json(