1

I'm writing a web app using Java, JSF and jQuery and I in my app I have a field, next to it I have a button, and I want in order to after click the button folder chooser dialog will appear. And after that path value will be sended to object in Java. I 'googled' it, but I found only one solution in jQuery where I can choose file, but I need to select a folder, not a file. Does anyone know which library shares that functionality? Should I do it in javascript/jQuery?

dante
  • 393
  • 1
  • 15
  • 31

1 Answers1

1

If you mean you want to choose a folder on the client side, you can't. In-browser JavaScript code doesn't have access to the workstation's file system, for fairly obvious security reasons. All you can do is drag-and-drop (which will give you one or more files, not folders), or use input type="file" which will let the user choose one single file.

T.J. Crowder
  • 1,031,962
  • 187
  • 1,923
  • 1,875