File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes How to upload only image file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply locked New topic

How to upload only image file

Anup Srivastava

Joined: Dec 21, 2005
Posts: 21
i am uploading file in jsp page using ,
<input type="file" name="image" size="20" >
Now user can upload file of any type, but i want that user can upload only image files. How can i do it?
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15379
You posted this question twice. other copy is here:

closing this one.

Consider Paul's rocket mass heater.
subject: How to upload only image file