This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund 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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "File upload filter" Watch "File upload filter" New topic
Author

File upload filter

Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2573

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">

TIA,
- Manish
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6


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

Eric
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: File upload filter
 
Similar Threads
File upload
Restricting user to upload a CSV file
accept attribute in <html:file
Uploading
How to upload only image file