From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 226201FF09B for ; Mon, 28 Sep 2026 16:07:09 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id A3DC4216EE; Mon, 28 Sep 2026 16:07:06 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 28 Sep 2026 16:07:02 +0200 Message-Id: To: "Max R. Carrara" , "Michal Fox" , From: "Max R. Carrara" Subject: Re: [PATCH manager] fix #6475: ui: upload: only show the file name of the selected file X-Mailer: aerc 0.18.2-0-ge037c095a049 References: <20260926084935.7-1-me@dualfroz.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1790604422784 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.351 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: F3RJOOIVFSAL5WZNSUQ3VRY63CC3BOUP X-Message-ID-Hash: F3RJOOIVFSAL5WZNSUQ3VRY63CC3BOUP X-MailFrom: m.carrara@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon Sep 28, 2026 at 4:02 PM CEST, Max R. Carrara wrote: > On Sat Sep 26, 2026 at 10:49 AM CEST, Michal Fox wrote: > > 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 > > --- > > Gave this a spin on my workstation and can confirm that only the file's > name is displayed. Code also looks fine to me. Forgot to mention that I checked this on both Firefox and Chromium. Works in both cases. > > LGTM! Thanks a lot for your contribution! > > Consider: > > Reviewed-by: Max R. Carrara > Tested-by: Max R. Carrara > > > www/manager6/window/UploadToStorage.js | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/www/manager6/window/UploadToStorage.js b/www/manager6/wind= ow/UploadToStorage.js > > index cc53596d..8010e127 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(fileI= nput.files[0].size)) || '-', > > ); > > vm.set('mimetype', (fileInput.files[0] && fileInput.files[= 0].type) || '-'); > > + // browsers hide the real path behind 'C:\fakepath\', so o= nly show the file name > > + input.setRawValue(fileInput.files[0]?.name ?? ''); > > }, > > > > hashChange: function (field, value) {