[pve-devel] [PATCH manager v1] fix #4947 spice: correct filename extension safari

Markus Frank m.frank at proxmox.com
Wed Sep 6 11:37:03 CEST 2023


Fix file extension for SPICE config download on
AppleWebKit browsers to ensure proper application
association on MacOS.

Signed-off-by: Markus Frank <m.frank at proxmox.com>
---
 www/manager6/Utils.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 6d4842df..06b63315 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -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;
 	    }
 
-- 
2.39.2






More information about the pve-devel mailing list