Question

I want a user to upload .csv file using file browse of html. I have used file input type but the user can upload any type of files with that. What i want is a user can only browse and see .csv file. How can i do that?? I have read about accept parameter but it is for audio/video/images. How can i do it with .csv?

Upload new Question Bank(.csv):-<input type="file" name="file">
Était-ce utile?

La solution

Use the accept attribute:

Upload new Question Bank(.csv):-<input type="file" name="file" accept=".csv" >
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top