File picker with ability to select folder to be us

2019-09-10 05:15发布

问题:

Basically what we need is an filepicker that can be used on a webpage to enable the user to select files and/or folders. BUT, we only need to be able to get the local (client side) filepaths for the selected files via javascript, to later be used with another fileupload applet. So the upload upload part is no problem, just the file picker part.

So is there any available crossplatform/browser components available (that can be skinned), or do we have to create a custom one in java? Or is there a smarter way to go?

Thanks for any help!

回答1:

It can be done easily using the "input" html tag with type set to "file". Read this article from w3.org.

Thanks, Vamyip



回答2:

Browsers cannot handle folders themselves. You need to use Flash or Java to do this.