looks ok, a bit weird, but researching showed that there are no extjs builtin ways for this, so...

Acked-by: Dominik Csapak <d.csa...@proxmox.com>

On 8/22/19 1:35 PM, Stefan Reiter wrote:
By default, all file types are shown, but the user now has the option of
filtering only by supported types in the file selector dialog.

Signed-off-by: Stefan Reiter <s.rei...@proxmox.com>
---
  www/manager6/storage/ContentView.js | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/www/manager6/storage/ContentView.js 
b/www/manager6/storage/ContentView.js
index 3677f8ad..b72fc88d 100644
--- a/www/manager6/storage/ContentView.js
+++ b/www/manager6/storage/ContentView.js
@@ -218,7 +218,14 @@ Ext.define('PVE.storage.Upload', {
                    xtype: 'filefield',
                    name: 'filename',
                    buttonText: gettext('Select File...'),
-                   allowBlank: false
+                   allowBlank: false,
+                   listeners: {
+                       afterrender: function(cmp) {
+                           cmp.fileInputEl.set({
+                               accept: '.img, .iso'
+                           });
+                       }
+                   }
                },
                pbar
            ]



_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to