add workaround for application/ogg

This commit is contained in:
n0emis
2020-02-11 00:02:36 +01:00
committed by GitHub
parent 596446d14b
commit cca0efbd8d
+2
View File
@@ -133,6 +133,8 @@ class PortalTelegram(BasePortal, ABC):
generic_types = ("text/plain", "application/octet-stream")
if file.mime_type in generic_types and document.mime_type not in generic_types:
mime_type = document.mime_type or file.mime_type
elif file.mime_type == 'application/ogg':
mime_type = 'audio/ogg'
else:
mime_type = file.mime_type or document.mime_type
info = ImageInfo(size=file.size, mimetype=mime_type)