[FIX] attachment modules: remove base64 encoding when reading files from storage

This commit is contained in:
Patrick Tombez
2020-11-04 10:41:26 +01:00
parent cf5ad883ac
commit 1f0a6974fa
2 changed files with 5 additions and 6 deletions
+1 -2
View File
@@ -2,7 +2,6 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
import base64
import logging
import os
import io
@@ -125,7 +124,7 @@ class IrAttachment(models.Model):
with io.BytesIO() as res:
bucket.download_fileobj(key, res)
res.seek(0)
read = base64.b64encode(res.read())
read = res.read()
except ClientError:
read = ''
_logger.info(