File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Uploading files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Uploading files" Watch "Uploading files" New topic

Uploading files

ram gaurav
Ranch Hand

Joined: Mar 29, 2006
Posts: 208

I am creating one application in which i have to upload word documents.

I have created BROWSE button through:

What i want that , when user click BROWSE then file chosser dialog box will get open , in that user can only able to select WORD documents.

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Rumor has it that there is an accept attribute, but it is not in any spec docs so I think you are out of luck. Best you could do is clientside validation to check the file type.

ram gaurav
Ranch Hand

Joined: Mar 29, 2006
Posts: 208
I agree. Here's the link:
subject: Uploading files
It's not a secret anymore!