X
Tap here to go to the mobile version of the site.

Support Forum

input type file, How to filter only .csv

Posted

use firefox 21.0 use <input type="file" accept="xxx" />


how to filter only .csv (***not include all file) when browse dialog


I try to use


.csv (show all file)


text/csv (show all file and .csv)


application/csv (show all file)


text/comma-separated-values (show all file)


help me, please thank you somjet

use firefox 21.0 use <input type="file" accept="xxx" /> -------------------- how to filter only .csv (***not include all file) when browse dialog ------------------ I try to use ---------------- .csv (show all file) ------------------- text/csv (show all file and .csv) ---------------- application/csv (show all file) ----------------- text/comma-separated-values (show all file) -------------------- help me, please thank you somjet

Modified by somjet

Chosen solution

Looks that there is still work to be done:

  • bug 826176 - File extension support for <input <="" accept="..." li="">

Please do not comment in bug reports: https://bugzilla.mozilla.org/page.cgi?id=etiquette.html

Read this answer in context 1

Additional System Details

Installed Plug-ins

  • Google Update
  • Next Generation Java Plug-in 10.21.2 for Mozilla browsers
  • NPRuntime Script Plug-in Library for Java(TM) Deploy
  • Shockwave Flash 11.6 r602
  • Adobe Shockwave for Director Netscape plug-in, version 12.0
  • VLC media player Web Plugin 2.0.2
  • Adobe PDF Plug-In For Firefox and Netscape 11.0.0
  • 4.1.10329.0
  • Intel web components updater - Installs and updates the Intel web components
  • Intel web components for Intel® Identity Protection Technology
  • The plug-in allows you to open and edit files using Microsoft Office applications
  • Office Authorization plug-in for NPAPI browsers

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0

More Information

FredMcD
  • Top 10 Contributor
4306 solutions 60428 answers

If you are wanting a selected list of files in an input window, try; <*.csv> By asking for <.csv> you are asking for a file with the extention of csv with no file name.

If you are wanting a selected list of files in an input window, try; <'''*.csv'''> By asking for <.csv> you are asking for a file with the extention of csv with no file name.

Question owner

thank fredmcd-hotmail

I try this <input type="file" accept="*.csv" /> but it don't work. when browse dialog it show All file (*.*). Have other idea?

thank fredmcd-hotmail I try this <input type="file" accept="*.csv" /> but it don't work. when browse dialog it show All file (*.*). Have other idea?
cor-el
  • Top 10 Contributor
  • Moderator
17673 solutions 159870 answers
See https://developer.mozilla.org/en/Web/HTML/Element/Input#attr-accept

Helpful Reply

thank cor-el


I try MIME Type 1. text/csv (show all file and .csv) 2. text/comma-separated-values (show all file)


but I want show only .csv in dialog browse filter (text/csv show 2 type *.* and *.csv I want to show only *.csv)


Have other solution?


thank you somjet

thank cor-el --------------- I try MIME Type 1. text/csv (show all file and .csv) 2. text/comma-separated-values (show all file) --------------- but I want show only .csv in dialog browse filter (text/csv show 2 type *.* and *.csv I want to show only *.csv) ----------------- Have other solution? ---------------- thank you somjet

Modified by somjet

cor-el
  • Top 10 Contributor
  • Moderator
17673 solutions 159870 answers

Chosen Solution

Looks that there is still work to be done:

  • bug 826176 - File extension support for <input <="" accept="..." li="">

Please do not comment in bug reports: https://bugzilla.mozilla.org/page.cgi?id=etiquette.html

Looks that there is still work to be done: *[https://bugzilla.mozilla.org/show_bug.cgi?id=826176 bug 826176] - File extension support for <input accept=... <i>Please do not comment in bug reports: https://bugzilla.mozilla.org/page.cgi?id=etiquette.html</i>

Question owner

thank cor-el I will wait it in new firefox version.


thank you for all answer. somjet

thank cor-el I will wait it in new firefox version. ------------------------------ thank you for all answer. somjet
cor-el
  • Top 10 Contributor
  • Moderator
17673 solutions 159870 answers

Helpful Reply

You're welcome somjet

You're welcome somjet