Skip to content

Commit

Permalink
Allow gif for extra network previews
Browse files Browse the repository at this point in the history
  • Loading branch information
missionfloyd authored Jul 5, 2023
1 parent 394ffa7 commit c602471
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/ui_extra_networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def fetch_file(filename: str = ""):
raise ValueError(f"File cannot be fetched: {filename}. Must be in one of directories registered by extra pages.")

ext = os.path.splitext(filename)[1].lower()
if ext not in (".png", ".jpg", ".jpeg", ".webp"):
raise ValueError(f"File cannot be fetched: {filename}. Only png and jpg and webp.")
if ext not in (".png", ".jpg", ".jpeg", ".webp", ".gif"):
raise ValueError(f"File cannot be fetched: {filename}. Only png, jpg, webp, and gif.")

# would profit from returning 304
return FileResponse(filename, headers={"Accept-Ranges": "bytes"})
Expand Down

0 comments on commit c602471

Please sign in to comment.