File picker with ability to select folder to be us

2019-09-10 05:19发布

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!

2条回答
何必那么认真
2楼-- · 2019-09-10 05:42

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

Thanks, Vamyip

查看更多
萌系小妹纸
3楼-- · 2019-09-10 05:49

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

查看更多
登录 后发表回答