Is there any jQuery plugin that will restrict the HTML file loader to only accept images

I saw many plugins for downloading files. I do not want to use the whole plugin to upload files.

So I use my own code. But I did not find a way to limit the type of file that the user accepts. How can I do this ?, Is there any plugin that only performs this function (I don’t want to use a full plugin to upload files)

0
source share
1 answer

This requires HTML5, jQuery is not required. I think it will be small enough to use pure JavaScript:

These are just some of the ideas. You can create some heuristics to check the file type based on this.

+3
source

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


All Articles