Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem related to HTML file attribute

 
Bk Jacky
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers
I made a jsp file in which i am using HTML file attribute like
this
<input type=file name=dir>
Now when i click on this button it opens a window which shows various file inthat directory . i select a ".xsd" file.
But I want that window should show only files with ".xsd" extension. Not other files.So what i hav to do so.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can add the accept attribute like accept="image/jpeg" but I am not 100% sure that all browsers support this. Be sure and check the file extension either in JavaScript and/or the server side code as well to be safe.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic