Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to accept *.csv format input file cross browsers?

I'm using:

<input type="file" accept=".csv" />

It working on Chrome, Firefox, IE 10+, but not working on Safari. And I try with:

<input type="file" accept="text/csv" />

It just working on Safari. Help me to cross browsers for it. Thanks.

like image 510
Huy Chau Avatar asked Oct 15 '15 11:10

Huy Chau


1 Answers

Just use comma for that )

<input type="file" accept=".csv, text/csv" />
like image 175
Another84 Avatar answered Sep 21 '22 19:09

Another84