summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
Diffstat (limited to 'addons')
-rw-r--r--addons/web_editor/controllers/main.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py
index b8f3b3eb36f..2cefa652706 100644
--- a/addons/web_editor/controllers/main.py
+++ b/addons/web_editor/controllers/main.py
@@ -242,6 +242,10 @@ class Web_Editor(http.Controller):
def _attachment_create(self, name='', data=False, url=False, res_id=False, res_model='ir.ui.view'):
"""Create and return a new attachment."""
+ if name.lower().endswith('.bmp'):
+ # Avoid mismatch between content type and mimetype, see commit msg
+ name = name[:-4]
+
if not name and url:
name = url.split("/").pop()