Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File upload filter

 
Manish Hatwalne
Ranch Hand
Posts: 2591
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic