diff --git a/api/js/etemplate/et2_widget_vfs.js b/api/js/etemplate/et2_widget_vfs.js index aa92e9c22a..999a9c93cd 100644 --- a/api/js/etemplate/et2_widget_vfs.js +++ b/api/js/etemplate/et2_widget_vfs.js @@ -947,7 +947,7 @@ var et2_vfsUpload = /** @class */ (function (_super) { if (file_data && (typeof file_data.download_url != 'undefined')) { var fe_mime = egw_get_file_editor_prefered_mimes(file_data.mime); // Check if the link entry is mime with media type, in order to open it in expose view - if (typeof file_data.mime != 'undefined' && + if (typeof file_data.mime === 'string' && (file_data.mime.match(mime.mime_regexp, 'ig') || (fe_mime && fe_mime.mime[file_data.mime]))) { vfs_attrs.onclick = function (ev) { ev.stopPropagation(); diff --git a/api/js/etemplate/et2_widget_vfs.ts b/api/js/etemplate/et2_widget_vfs.ts index 3745080d56..347979c6af 100644 --- a/api/js/etemplate/et2_widget_vfs.ts +++ b/api/js/etemplate/et2_widget_vfs.ts @@ -1092,7 +1092,7 @@ class et2_vfsUpload extends et2_file { var fe_mime = egw_get_file_editor_prefered_mimes(file_data.mime); // Check if the link entry is mime with media type, in order to open it in expose view - if (typeof file_data.mime != 'undefined' && + if (typeof file_data.mime === 'string' && (file_data.mime.match(mime.mime_regexp,'ig') || (fe_mime && fe_mime.mime[file_data.mime]))) { vfs_attrs.onclick = function(ev) {