• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

S:file tag restrict file types

 
Varun K. Gupta
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am using s:file struts2 tag to upload multiple files. I want to restrict file type to PDF or XML while clicking on browser button.

Accept attribute is not supported by major browser. Is there any way when browser button is clicked, the "Chose file to upload" popup contains only File of type as PDF only.. currently it is showing me All File[*]...

 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when we click on choose file in the pop up box we have display *.pdf are you expecting this.
 
Varun K. Gupta
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes Mohana, I am excepting only *.pdf it should not show me "All Files" or any other type in dropdown.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic