From 2b64a2d0cedac7503ba5352bed3b762e2770b003 Mon Sep 17 00:00:00 2001 From: Roland Date: Thu, 15 Dec 2022 08:52:06 -0700 Subject: [PATCH] Adding more mimetypes (js/css/srt). --- wrolpi/files/lib.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wrolpi/files/lib.py b/wrolpi/files/lib.py index 5e0da11d..88fc0ba3 100644 --- a/wrolpi/files/lib.py +++ b/wrolpi/files/lib.py @@ -114,6 +114,12 @@ def _mimetype_suffix_map(path: Path, mimetype: str): return 'application/sta' if suffix.endswith('.scad'): return 'application/x-openscad' + if suffix.endswith('.js'): + return 'application/javascript' + if suffix.endswith('.css'): + return 'text/css' + if suffix.endswith('.srt'): + return 'text/srt' if suffix.endswith('.yaml') or suffix.endswith('.yml'): return 'text/yaml' return mimetype