Asked • 05/19/19

Limit file format when using <input type="file">?

I'd like to restrict the type of file that can be chosen from the native OS file chooser when the user clicks the Browse button in the `<input type="file">` element in HTML. I have a feeling it's impossible, but I'd like to know if there _is_ a solution. I'd like to keep solely to HTML and JavaScript; no Flash please.

1 Expert Answer

By:

Anthony C. answered • 09/23/19

Tutor
4.8 (6)

Knowledgeable and Experienced Programmer Offering Tech Tutoring

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.