Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Add WASM type #216

Merged
merged 1 commit into from
Nov 9, 2023
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 modules/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ def pretty_type(mime_typ, ext):
(typ for typ in ["flash", "webm", "mp4", "flv"] if typ in mime_typ), None
) or ext in ["mp4", "webm", "ts", "m4v", "m4s", "mov", "ogv", "swf", "f4v", "flv"]:
return "video"
elif "wasm" in mime_typ or ext == "wasm":
return "wasm"
elif "html" in mime_typ or ext in ["html", "htm"]:
# Here is where we catch "text/html" mime type.
return "html"
Expand Down
1 change: 1 addition & 0 deletions test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def test_pretty_type_ext(self):
("flv", "video"),
("html", "html"),
("htm", "html"),
("wasm", "wasm"),
]

for given, expect in tests:
Expand Down
Loading