summaryrefslogtreecommitdiff
path: root/addons/web/controllers/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/controllers/main.py')
-rw-r--r--addons/web/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index 3aa2c0e64d9..d893271ac6c 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -1292,7 +1292,7 @@ class Binary(http.Controller):
try:
attachment = Model.create({
'name': filename,
- 'datas': base64.encodestring(ufile.read()),
+ 'datas': base64.encodebytes(ufile.read()),
'res_model': model,
'res_id': int(id)
})