FileUploadField accept attribute

  1. #1

    FileUploadField accept attribute

    Hello

    Is it possible to set the accept attribute of the input file element for the FileUploadField?

    http://www.w3schools.com/tags/att_input_accept.asp
  2. #2
    Hi @Spamme,

    Here you are.
    <ext:FileUploadField runat="server">
        <Listeners>
            <AfterRender Handler="this.fileInputEl.set({ accept: 'image/*'});" />
        </Listeners>
    </ext:FileUploadField>
  3. #3
    Thanks, it works.

    Although it would be "cleaner" without javascript, now you have to generate javascript, which is execute client side, at the end it's just a simple attribute of the input file and it doesn't need any logic, just a plain text attribute.
  4. #4
    Agree, that makes sense, but currently there is no such a possibility.

    I asked Sencha here:
    http://docs-origin.sencha.com/extjs/...ty-fileInputEl
    Last edited by Daniil; Nov 08, 2013 at 3:55 AM.

Similar Threads

  1. [CLOSED] Accept Changes Treepanel store
    By RCM in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 30, 2013, 10:11 PM
  2. Accept Icon Missing
    By Tbaseflug in forum 2.x Help
    Replies: 1
    Last Post: Nov 24, 2012, 5:15 AM
  3. Replies: 3
    Last Post: Apr 11, 2012, 7:43 AM
  4. [CLOSED] icon-accept and ValidationStatus
    By idrissb in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 26, 2009, 2:15 PM
  5. Replies: 1
    Last Post: Oct 10, 2008, 8:38 PM

Tags for this Thread

Posting Permissions