1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    21
    Vote Rating
    0
    Supriya Kale is on a distinguished road

      0  

    Default Unanswered: Displaying only specific types of files in the filefield control

    Unanswered: Displaying only specific types of files in the filefield control


    Hi,

    I want to show only CSV files using filefield the dialog are only CSV files. Is there some property in 'filefield ' needs to be set/overriden?

    Thanks in advance.

  2. #2
    Sencha User
    Join Date
    Dec 2009
    Location
    Enschede, The Netherlands
    Posts
    327
    Answers
    16
    Vote Rating
    13
    flanders will become famous soon enough

      0  

    Default


    There is no option to do this on form.field.File as far as I know.

    One direction for a solution might be: http://stackoverflow.com/questions/8...ific-file-type, however this doesn't work in every browser. Which might be the reason ExtJS doesn't support it - nor will.

    I fear this is going to be a tricky one since most browsers are focusing on the webpage not being able to interfere with the local computer.

  3. #3
    Sencha User Arg0n's Avatar
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    122
    Answers
    12
    Vote Rating
    16
    Arg0n will become famous soon enough Arg0n will become famous soon enough

      0  

    Default


    Impossibile ^^

    You can't filter displayed file types. It's restricted by browsers. What you can do is add a validator, which checks the ".csv"

    Only files with .csv:

    Code:
    regex: /^.*\.(csv|CSV)$/,
    regexText: 'Only CSV files allowed'
    Last edited by Arg0n; 29 Nov 2012 at 1:59 AM. Reason: added code example o.O

  4. #4
    Sencha User
    Join Date
    Nov 2012
    Posts
    21
    Vote Rating
    0
    Supriya Kale is on a distinguished road

      0  

    Default


    Quote Originally Posted by Arg0n View Post
    Impossibile ^^

    You can't filter displayed file types. It's restricted by browsers. What you can do is add a validator, which checks the ".csv"

    Only files with .csv:

    Code:
    regex: /^.*\.(csv|CSV)$/,
    regexText: 'Only CSV files allowed'
    Yes u r ri8, Thanks Arg0n.

  5. #5
    Sencha User Arg0n's Avatar
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    122
    Answers
    12
    Vote Rating
    16
    Arg0n will become famous soon enough Arg0n will become famous soon enough

      0  

    Default


    Better way would be to build an own validator for it.

    See: Form Package Guide (2. Custom Validations)

    =)

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."