FileUploader accept = "image / *" validation problem

I added the attribute accept="image/*" to the file loader <input type="file" name="imageUploader"> .

I select any image file in the bootloader. And try sending data to the server. But imageUploader fixed the error and will add class="input-validation-error" .

Why is this happening?

+4
source share
1 answer

you should try to specify the php type for the image downloader, and if you still have problems, add each image type separately, for example.

 == "image/jpeg" or "image/png" or "image/gif" 
+1
source

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


All Articles