Frage

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">
War es hilfreich?

Lösung

Use the accept attribute:

Upload new Question Bank(.csv):-<input type="file" name="file" accept=".csv" >
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top