How can I let the user select a folder from an HTML page so that all the files can be uploaded
Allowing a user to upload a single file is very easy using the <input type="file"/>
tag.
How can I let a user select an entire folder so that it's contents can be 开发者_开发技巧uploaded. I imagine that using a Java applet would work, but I am hoping there is a simpler solution.
If you are using HTML5 you can use drag and drop upload to select multiple files from the folder. ( http://www.appelsiini.net/2009/10/html5-drag-and-drop-multiple-file-upload )
There is no such support in browser - mostly for security reasons. If you let a user select a folder and the browser could scan through all files, you could potentially scan through their whole hard drive.
精彩评论