5

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.

3
  • Since you did it twice, are you aware accept is spelled "accept"? Commented Oct 16, 2015 at 1:28
  • Sorry about my typos. Currently, I'm using accept=".csv", it no working on Safari. Commented Oct 19, 2015 at 1:23
  • As of the time of this comment, Safari "supports the type format (e.g. image/*) but not the extension format (e.g. .png)". See caniuse accept. Commented Nov 4, 2015 at 0:34

1 Answer 1

13

Just use comma for that )

<input type="file" accept=".csv, text/csv" />
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.