fix: add "video" into supported MIME types when uploading files

This commit is contained in:
Terry Geng
2020-06-30 17:15:00 +08:00
parent 9fe03f3425
commit dbe25cec8e
2 changed files with 2 additions and 2 deletions

View File

@ -681,7 +681,7 @@ def upload():
log.info('web: - targetdir: ' + targetdir)
log.info('web: - mimetype: ' + file.mimetype)
if "audio" in file.mimetype:
if "audio" in file.mimetype or "video" in file.mimetype:
storagepath = os.path.abspath(os.path.join(var.music_folder, targetdir))
if not storagepath.startswith(os.path.abspath(var.music_folder)):
abort(403)