Upload a folder in ASP.NET of Flash or Silverlight

扶醉桌前 提交于 2019-11-29 09:01:25

You can use Flash (and probably Silverlight) to select all the files in a folder to upload, however you cannot select a folder or recurse folders.

Here is an exmaple that uses flash as the visual front end: http://www.codeproject.com/KB/aspnet/FlashUpload.aspx

Here is an example that uses flash for the multiple file upload by uses JQuery for the visuals: http://www.uploadify.com/demo/

In order to achieve selecting folders you will need to build an ActiveX control or Java Applet which has a lot more control over the operating system.

AFAIK, you cannot upload an entire folder (in flash at least). You can upload a single file using the FileReference class in flash.

The JUpload project on Sourceforge has a handy open source implementation of what you're looking for. Here's a demo.

But IMO this is a UI nightmare compared to file-only js / flash based uploaders... applets are far too slow and clunky to find a place in modern websites.

And that approval box to allow access to the user's system is not going to inspire any trust in your application, notwithstanding the security concerns. As far as the average joe is concerned, if they're able to upload a few files without hassle, why should they have to face a strange dialog box for a folder?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!