Oracle Community Directory
Oracle Community FAQ
My Oracle Support Community (MOSC)
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
: Nov 13, 2007 4:36 PM by
Restricting File Types in the "Choose File" window
Nov 13, 2007 10:08 AM
I am using struts *<html:file>* to upload a file.
When i click on browse button, one dialog box ie choose file window opens.
But initially, it shows All Files (*.*) in File types text box. But i want to restrict the user there only to select some specific types.
I use accept attribute of <html:file> tag and provide value like "*application/pdf,image/jpeg*".
But it is showing All Files in that choose file window.
can anybody help me on this?
This content has been marked as final.
Show 1 reply
Re: Restricting File Types in the "Choose File" window
Nov 13, 2007 4:36 PM
in response to
there were a way of doing that but using the accept attribute in the input tag like <input type="file" accept"your MIME types">
but many browsers ignore this attribute and still show all file types.
another way to solve the problem is to validate the file selected after user clicks ok by java script code.
Re: File upload from OAF page