mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-24 17:38:42 -06:00
[IMP] attachment_preview: uncomment _logger in ir_attachment.py
This commit is contained in:
parent
687e23cd82
commit
711aa6272c
@ -48,14 +48,14 @@ class IrAttachment(models.Model):
|
|||||||
mimetype = magic.from_file(
|
mimetype = magic.from_file(
|
||||||
this._full_path(this.store_fname), mime=True
|
this._full_path(this.store_fname), mime=True
|
||||||
)
|
)
|
||||||
# _logger.debug(
|
_logger.debug(
|
||||||
# "Magic determined mimetype %s from file %s",
|
"Magic determined mimetype %s from file %s",
|
||||||
# mimetype,
|
mimetype,
|
||||||
# this.store_fname,
|
this.store_fname,
|
||||||
# )
|
)
|
||||||
else:
|
else:
|
||||||
mimetype = magic.from_buffer(this[binary_field], mime=True)
|
mimetype = magic.from_buffer(this[binary_field], mime=True)
|
||||||
# _logger.debug("Magic determined mimetype %s from buffer", mimetype)
|
_logger.debug("Magic determined mimetype %s from buffer", mimetype)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
(mimetype, encoding) = mimetypes.guess_type(
|
(mimetype, encoding) = mimetypes.guess_type(
|
||||||
"data:;base64," + this[binary_field].decode("utf-8"), strict=False
|
"data:;base64," + this[binary_field].decode("utf-8"), strict=False
|
||||||
|
Loading…
Reference in New Issue
Block a user