From f353e9405200e9df982eed90e127fb13f19e8090 Mon Sep 17 00:00:00 2001 From: Michal Fox Date: Sat, 26 Sep 2026 08:49:35 +0000 Subject: [PATCH] fix #6475: ui: upload: only show the file name of the selected file For privacy reasons, browsers do not expose the real path of a selected file and prefix its name with 'C:\fakepath\' instead, on every platform. The file field of the upload window shows this value as is, which confuses users on Linux or macOS clients. Show the name of the selected file object instead. Only the displayed value changes, the upload itself uses the file object and is not affected. Signed-off-by: Michal Fox Reviewed-by: Max R. Carrara Tested-by: Max R. Carrara Link: https://lore.proxmox.com/20260926084935.7-1-me@dualfroz.com --- www/manager6/window/UploadToStorage.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/manager6/window/UploadToStorage.js b/www/manager6/window/UploadToStorage.js index cc53596..8010e12 100644 --- a/www/manager6/window/UploadToStorage.js +++ b/www/manager6/window/UploadToStorage.js @@ -167,6 +167,8 @@ Ext.define('PVE.window.UploadToStorage', { (fileInput.files[0] && Proxmox.Utils.format_size(fileInput.files[0].size)) || '-', ); vm.set('mimetype', (fileInput.files[0] && fileInput.files[0].type) || '-'); + // browsers hide the real path behind 'C:\fakepath\', so only show the file name + input.setRawValue(fileInput.files[0]?.name ?? ''); }, hashChange: function (field, value) {