Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backend/app/api/v1/endpoint_modules/resources/thumbnail.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ async def _fast_thumbnail_alias_redirect(resource_id: str) -> RedirectResponse |
image_hash = await _current_hot_thumbnail_hash_for_resource(resource_id)
if not image_hash:
return None
if not await _thumbnail_hash_has_cached_image(image_hash):
return None
return _thumbnail_asset_redirect(image_hash)


Expand Down
2 changes: 2 additions & 0 deletions backend/app/api/v1/endpoint_modules/thumbnails.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ async def _get_resource_alias_redirect(resource_id: str) -> Response | None:
return None
if not image_hash:
return None
if not await _thumbnail_hash_has_cached_image(image_hash):
return None

return Response(
status_code=302,
Expand Down
Loading
Loading