I am writing a web application that requires the user to select a csv file. However, due to the fact that the user has files with server suffixes, it is quite typical to have several files with similar names, and only one of them is CSV. the accept=".csv" problem only works partially - it allows the user to filter csv, but does not do it by default, filtering by type unknown
<fieldset name="inputForm"> <legend>Input</legend> <label>Input file:</label> <input name="inputFile" type="file" accept=".csv"> </fieldset>
I also tried accept="text/csv, .csv" , but didn't change anything.
Result: 
the user may accidentally select, for example, one of the .txt files or .png, which may lead to a malfunction of the application due to an incorrect input file. The user can choose to filter only CSV or only "unknown", but I would prefer that CSV be only the default filter, because it is obvious that no one will ever switch file filtering options, so realistic is useless ...
source share