mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-23 04:22:04 -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(
|
||||
this._full_path(this.store_fname), mime=True
|
||||
)
|
||||
# _logger.debug(
|
||||
# "Magic determined mimetype %s from file %s",
|
||||
# mimetype,
|
||||
# this.store_fname,
|
||||
# )
|
||||
_logger.debug(
|
||||
"Magic determined mimetype %s from file %s",
|
||||
mimetype,
|
||||
this.store_fname,
|
||||
)
|
||||
else:
|
||||
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:
|
||||
(mimetype, encoding) = mimetypes.guess_type(
|
||||
"data:;base64," + this[binary_field].decode("utf-8"), strict=False
|
||||
|
Loading…
Reference in New Issue
Block a user