Hi all does anyone know of an example of a Directory Chooser applet that will allow a user to select a direc开发者_如何学JAVAtory on their local machine? I have a function written in PHP that extracts sub-directory names but I have only tested it on my own machine. I realise that there are security issues involved and was wondering if anyone has had experience with something like this. any help would be greatly appreciated.
See JFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY ).
The applet code will need to be digitally signed by you, and trusted by the end user when prompted, in order to show a file chooser (or to to many of the things you might want to do later with a directory).
You might be able to use Moxiecodes Plupload scripts to do what you need. It doesn't support entire folder uploads out of the box, but if your browser supports BrowserPlus then you may be able to. See a recentish forum post on the topic:
No, only browserplus enables you to select entire directories. You will have to shift select files in the other runtimes.
Source: http://www.plupload.com/punbb/viewtopic.php?id=236
I have never done this so I have no experience with it.
精彩评论