开发者

How can I let the user select a folder from an HTML page so that all the files can be uploaded

开发者 https://www.devze.com 2023-03-28 03:54 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消