Validate if it is a photo or a video with the component select images

Hello family, I have a problem with the component select image and the problem comes when the user selects a video.

How do I let the application know that if it is not an image that the user selected, then that an error message will appear and that it should choose a photo again.

I await your reply, thank you very much in advance.

did you tried image picker component??

That is the component I use.

what about checking the extension of the file? if it is mp4 or 3gp then it is a video…

1 Like