public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH manager] ui: download iso: trim filename to correctly detect file extension
@ 2026-02-17 12:26 Lukas Sichert
  0 siblings, 0 replies; only message in thread
From: Lukas Sichert @ 2026-02-17 12:26 UTC (permalink / raw)
  To: pve-devel; +Cc: Lukas Sichert

When downloading an ISO from a URL without querying for the
metadata, one can set a custom filename. If this filename is trailed by
blank spaces, trying to download will result in the error:
'Parameter verification failed. (400) filename: wrong file extension'

To correctly detect file extensions, adjust the getSubmitValue function
for this specific textfield to trim the filename for blankspaces.

Signed-off-by: Lukas Sichert <l.sichert@proxmox.com>
---
 www/manager6/window/DownloadUrlToStorage.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/www/manager6/window/DownloadUrlToStorage.js b/www/manager6/window/DownloadUrlToStorage.js
index 4fe4c669..f1c4392c 100644
--- a/www/manager6/window/DownloadUrlToStorage.js
+++ b/www/manager6/window/DownloadUrlToStorage.js
@@ -165,6 +165,9 @@ Ext.define('PVE.window.DownloadUrlToStorage', {
                     allowBlank: false,
                     fieldLabel: gettext('File name'),
                     emptyText: gettext('Please (re-)query URL to get meta information'),
+                    getSubmitValue: function () {
+                        return this.processRawValue(this.getRawValue())?.trim();
+                    },
                 },
             ],
             column1: [
-- 
2.47.3




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-02-17 12:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-17 12:26 [PATCH manager] ui: download iso: trim filename to correctly detect file extension Lukas Sichert

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