mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-23 04:22:04 -06:00
[FIX] remove old magic's charset detection
This commit is contained in:
parent
7dd66e3274
commit
637dd3efb7
@ -51,7 +51,7 @@ class IrAttachment(Model):
|
||||
(mimetype, encoding) = mimetypes.guess_type(
|
||||
'data:;base64,' + this.datas, strict=False)
|
||||
extension = mimetypes.guess_extension(
|
||||
mimetype, strict=False)
|
||||
mimetype.split(';')[0], strict=False)
|
||||
|
||||
result[this.id] = (extension or '').lstrip('.').lower()
|
||||
return result if isinstance(ids, collections.Iterable) else result[ids]
|
||||
|
Loading…
Reference in New Issue
Block a user