This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes File upload filter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "File upload filter" Watch "File upload filter" New topic

File upload filter

Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2578

Can I apply filter to following type of input control? I only want user to upload jpg files. How can I ensure that?

<input type="file" name="theFile">

- Manish
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376

That is the basic idea....BUT you should always check it on the server TOO.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: File upload filter
Similar Threads
Restricting user to upload a CSV file
accept attribute in <html:file
File upload
How to upload only image file