0

I'm trying to use the ExtJs filefield control to upload a file.

I use it as follows:

 xtype: 'container',
        margin: '15 0 0 25',
        layout: 'vbox',
        defaults: {
            width: 400
        },
        items: [{
            xtype: 'filefield',
            itemId: 'fileChooser',
            fieldLabel: 'CSV file',
            labelWidth: 50,
            buttonText: 'Select CSV file...'
       }]

But, after I use it to choose a file (which I manage to do correctly), The fieldfile dissappears!

Did someone have the same problem?

user1028741
  • 2,745
  • 6
  • 34
  • 68

1 Answers1

-1

Please try it in this way

                            {
                              xtype: 'form',
                              type: 'fileUploadForm',
                              items: [{
                                xtype: 'filefield',
                                cls:'upload-btn',
                                height:40,
                                type:'uploadButton',
                                name: 'file',
                                buttonText:'Upload New Version',
                            listeners: {
                                scope: this,
                                change: this.handleIconChange
                            }
                        }]
                        }
Sreek521
  • 669
  • 4
  • 9