diff --git a/attachment_minio/__manifest__.py b/attachment_minio/__manifest__.py index fe230ae8..495041dc 100755 --- a/attachment_minio/__manifest__.py +++ b/attachment_minio/__manifest__.py @@ -1,6 +1,6 @@ { "name": "Attachment MinIO", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "depends": [ "base_attachment_object_storage", ], diff --git a/attachment_minio/migrations/13.0.0.0.1/post-migration.py b/attachment_minio/migrations/14.0.0.0.1/post-migration.py similarity index 100% rename from attachment_minio/migrations/13.0.0.0.1/post-migration.py rename to attachment_minio/migrations/14.0.0.0.1/post-migration.py diff --git a/attachment_minio/models/ir_attachment.py b/attachment_minio/models/ir_attachment.py index 70ba2640..2d963f8f 100644 --- a/attachment_minio/models/ir_attachment.py +++ b/attachment_minio/models/ir_attachment.py @@ -3,7 +3,6 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) import io -import base64 import logging from minio import Minio from minio.error import NoSuchKey @@ -73,7 +72,7 @@ class MinioAttachment(models.Model): bucket = self._get_minio_bucket(client, name=s3uri.bucket()) try: response = client.get_object(bucket, s3uri.item()) - return base64.b64encode(response.read()) + return response.read() except NoSuchKey: _logger.info('attachment "%s" missing from remote object storage', (fname, )) return ''