How to allow only custom input format?

Asked

Viewed 22 times

0

I’m doing an input with custom types and it still keeps displaying "all files" and would like to remove it

<input type="file" name="file" accept=".xls"  />

It is possible to do this?

  • To be sure I went after a link, but it is not possible to remove this option (and as commented, it is not necessary) https://stackoverflow.com/a/24115254/4551469

  • It is not possible, but you can validate the client-side extension and mimetype on the server. https://answall.com/a/271946/99718

  • I will make this validation in the client same

  • Remembering that the file type should be validated in the back-end, otherwise it would be a security error and would allow hacking.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.