Add alias for .ogg files

pull/21/head
Dan Puttick 2017-08-22 16:41:06 -04:00
parent 77e0d55f95
commit d80fb6d33a
2 changed files with 4 additions and 2 deletions

View File

@ -31,7 +31,9 @@ class Config:
'application/x-dosexec': 'application/x-msdos-program',
# Other apps with confusing mimetypes
'application/rtf': 'text/rtf',
'application/rar': 'application/x-rar'
'application/rar': 'application/x-rar',
'application/ogg': 'audio/ogg',
'audio/ogg': 'application/ogg'
}
# EXTS

View File

@ -112,7 +112,7 @@ class File(FileBase):
strict=False)
if expected_extensions:
if self.has_extension and self.extension not in expected_extensions:
self.make_dangerous('Extension does not match expected extensions for this mimetype')
self.make_dangerous('Extension does not match expected extensions ({}) for this mimetype'.format(expected_extensions))
def _check_filename(self):
"""