Вопрос

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">
Это было полезно?

Решение

Use the accept attribute:

Upload new Question Bank(.csv):-<input type="file" name="file" accept=".csv" >
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top