Input type = "file" - accept files without extension

How can I accept files without any extension?
I need to accept .json and without extension files
I tried

<input type="file" accept=".json, . "/>  

and some of its variations with a dot and empty space, but none of them work

+4
source share
1 answer

There is no such function in the HTML file yet. If you want, you can deploy this function either through server-side programming or through JavaScript validation. Accept all format files and confirm the format and find the desired formats and restrict all other formats.

+2
source

Source: https://habr.com/ru/post/1679036/


All Articles