summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/document_viewer.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-04-05 10:50:56 +0200
committerChristophe Simonis <chs@odoo.com>2019-04-05 10:50:56 +0200
commitf2be461f0906ed47306da58c31240014b6239d80 (patch)
tree6084c152dd56f691aa75c2e4580ffaf53b8257ba /addons/mail/static/src/js/document_viewer.js
parentf391b8c5a55bdc512d70cb8b3e61f23903abb5ed (diff)
parentf2d0995362ccdae88ba64597ea6f0feca3eab618 (diff)
[MERGE] forward port branch saas-12.1 up to f2d0995362c
Diffstat (limited to 'addons/mail/static/src/js/document_viewer.js')
-rw-r--r--addons/mail/static/src/js/document_viewer.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/mail/static/src/js/document_viewer.js b/addons/mail/static/src/js/document_viewer.js
index 338b5889828..8b6f27b480e 100644
--- a/addons/mail/static/src/js/document_viewer.js
+++ b/addons/mail/static/src/js/document_viewer.js
@@ -44,11 +44,10 @@ var DocumentViewer = Widget.extend({
this._super.apply(this, arguments);
this.attachment = _.filter(attachments, function (attachment) {
var match = attachment.type === 'url' ? attachment.url.match("(youtu|.png|.jpg|.gif)") : attachment.mimetype.match("(image|video|application/pdf|text)");
-
if (match) {
- attachment.type = match[1];
+ attachment.fileType = match[1];
if (match[1].match("(.png|.jpg|.gif)")) {
- attachment.type = 'image';
+ attachment.fileType = 'image';
}
if (match[1] === 'youtu') {
var youtube_array = attachment.url.split('/');