mirror of
https://github.com/Xevion/simple-viewer.git
synced 2026-01-31 14:25:59 -06:00
basic site design, directory path reading, uuid setup, file icon mimetype categorization
This commit is contained in:
@@ -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'
|
||||
Reference in New Issue
Block a user