public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH manager] fix #6475: ui: upload: only show the file name of the selected file
@ 2026-09-26  8:49 Michal Fox
  2026-09-28 14:02 ` Max R. Carrara
  2026-09-30 10:27 ` applied: " Dominik Csapak
  0 siblings, 2 replies; 4+ messages in thread
From: Michal Fox @ 2026-09-26  8:49 UTC (permalink / raw)
  To: pve-devel

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




^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-30 10:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-26  8:49 [PATCH manager] fix #6475: ui: upload: only show the file name of the selected file Michal Fox
2026-09-28 14:02 ` Max R. Carrara
2026-09-28 14:07   ` Max R. Carrara
2026-09-30 10:27 ` applied: " Dominik Csapak

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