public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Michal Fox <me@dualfroz.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager] fix #6475: ui: upload: only show the file name of the selected file
Date: Sat, 26 Sep 2026 08:49:35 +0000	[thread overview]
Message-ID: <20260926084935.7-1-me@dualfroz.com> (raw)

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 <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 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(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) {
-- 
2.43.0




             reply	other threads:[~2026-09-28  7:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-26  8:49 Michal Fox [this message]
2026-09-28 14:02 ` [PATCH manager] fix #6475: ui: upload: only show the file name of the selected file Max R. Carrara
2026-09-28 14:07   ` Max R. Carrara
2026-09-30 10:27 ` applied: " Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260926084935.7-1-me@dualfroz.com \
    --to=me@dualfroz.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal