basic site design, directory path reading, uuid setup, file icon mimetype categorization

This commit is contained in:
Xevion
2020-10-31 12:28:29 -05:00
parent f7cde0b4dc
commit c8fcb09b73
7 changed files with 145 additions and 4 deletions

8
viewer/helpers.py Normal file
View File

@@ -0,0 +1,8 @@
def get_mediatype(mimetype: str) -> str:
"""Simple media type categorization based on the given mimetype"""
if mimetype is not None:
if mimetype.startswith('image'):
return 'image'
elif mimetype.startswith('video'):
return 'video'
return 'file'