]> git.proxmox.com Git - pve-manager.git/commitdiff
fix #4947 spice: correct filename extension safari
authorMarkus Frank <m.frank@proxmox.com>
Wed, 6 Sep 2023 09:37:03 +0000 (11:37 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 6 Sep 2023 14:46:03 +0000 (16:46 +0200)
Fix file extension for SPICE config download on
AppleWebKit browsers to ensure proper application
association on MacOS.

Signed-off-by: Markus Frank <m.frank@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/Utils.js

index 6d4842df2578cfe466d38f93a0c53458ede1c8cc..06b63315fff71f5ce3d6596b45249c2598618b2c 100644 (file)
@@ -1401,10 +1401,11 @@ Ext.define('PVE.Utils', {
                css: 'display:none;visibility:hidden;height:0px;',
            });
 
-           // Note: we need to tell Android and Chrome the correct file name extension
+           // Note: we need to tell Android, AppleWebKit and Chrome
+           // the correct file name extension
            // but we do not set 'download' tag for other environments, because
            // It can have strange side effects (additional user prompt on firefox)
-           if (navigator.userAgent.match(/Android|Chrome/i)) {
+           if (navigator.userAgent.match(/Android|AppleWebKit|Chrome/i)) {
                link.download = name;
            }