Results 1 to 2 of 2

Thread: Ext.form.field.File - Bring up file upload screen from function.

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    4
    Vote Rating
    0
      0  

    Default Ext.form.field.File - Bring up file upload screen from function.

    Hello all,

    I need to bring up the file upload screen provided by Ext.form.field.File from a function, however have been stuck on this for a while.

    I presume my function needs to call that the same function used as when a user clicks on the browse button in the fileUploader, however I can't find the function to do this.

    Any help would be much apreciated.


    my.fileUploader = Ext.create('Ext.form.field.File', {


    border: false,
    buttonOnly: true,
    xtype: 'filefield',
    name: 'photo',
    fieldLabel: 'Photo',
    labelWidth: 200,
    msgTarget: 'side',
    allowBlank: false,
    hideLabel: true,
    anchor: '100%',
    listeners: {
    'change': function (button, value) {


    my.submitFunction();
    }
    }




    });

    Unfortunately I can not see this in the documentation anywhere and have spent the last few hours searching the web for a solution.

    Thanks in advance for any help.
    James.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,382
    Answers
    3997
    Vote Rating
    1535
      0  

    Default

    The browser imposes a limit to what you can do with a file input field.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •