-1

I'm looking for a way to stop users from uploading video to my site. I just want images and GIF.

Is there a javascript method I can apply to prompt users that video format is not allowed?

<input type="file">
0

1 Answer 1

1

Try with,

<input type="file" name="myImage" accept="image/x-png,image/gif,image/jpeg" />
Sign up to request clarification or add additional context in comments.

2 Comments

A lot of images are now .webp format. How do I handle that?
with accept add image/webp

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.