Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome file upload not recognising accept mimetype 'text/csv'

I'm trying to limit the files shown in the pop-up file selector when using chrome to just csv files (I would settle for just text files including csvs).

I have tried the following accept options:

  • text/csv; All files shown
  • text/comma-separated-values; All files shown
  • application/csv; All files shown
  • application/excel; All files shown
  • application/vnd.ms-excel; 97-03 Excel workbooks, but no csvs
  • text/*; Some text files shown, but no csvs
  • application/*; Some application files shown, but no csvs

Am I missing something?

like image 539
Arth Avatar asked May 20 '15 11:05

Arth


1 Answers

The solution is simple, although not very intuitive given the other mime types.

Just use .csv and Chrome will filter your files properly.

like image 57
carlossierra Avatar answered Oct 07 '22 18:10

carlossierra