Results 1 to 2 of 2

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

  1. #1

    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,379
    Answers
    3997

    Default

    The browser imposes a limit to what you can do with a file input field.
    Mitchell Simoens @LikelyMitch

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

    Posts are my own, not any current, past or future employer's.

Posting Permissions

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