列出Web应用程序中的本地目录 [英] List local directory on Web Application

查看:188
本文介绍了列出Web应用程序中的本地目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Web应用程序的想法,我需要列出客户端计算机上存在的目录的所有文件(例如C:\Temp)。



我在互联网上搜索了很多,以及堆栈溢出。我无法找到有关我的问题的任何问题的答案。



我想能够列出目录的所有文件和子目录,如果可能,请获取文件类型。



我知道这不能仅使用本机Javascript。如果有一些限制像Firefox这样的浏览器的东西,像XPCOM,我不介意使用。



我只想知道在WEB应用程序上执行此操作的最佳方法是什么。 (Windows应用程序是不可接受的,也不希望依靠ActiveX,因为我们没有规划IE支持)。



我们偏好基于Javascript解决方案。我们真的不想依靠服务器端这样做。但是我们对服务器端的建议开放。
对于任何服务器端的建议,我们使用ASP .NET MVC。



我们正在寻找类似于 jscript - 获取目录中的文件列表,但我不想依靠ActiveX。正如之前所说的,只有Firefox的解决方案是可行的。

解决方案

简而言之:您无法获取控件列出文件位于浏览器的本地系统(客户机)上。


I have an idea a Web Application and I would need to list all files of a directory that exists on the client machine (For example C:\Temp).

I searched a lot on the Internet and as well on Stack Overflow. I couldn't find an answer on any questions that soved my problems.

I want to be able to list all files and subdirectories of a directory and if possible get the file type.

I know that this isn't able to do only with native Javascript. If there is something restricted to a browser like Firefox, like XPCOM I wouldn't mind using.

I just wanted to know what is the best approach to do this on a WEB Application. (Windows apps are not acceptable, and also don't want to rely on ActiveX since we're no planning on IE support).

We have a preference for Javascript based solutions. We really don't want to rely on Server-Side to do this. But we are opened to Server-Side suggestions. For any server-side suggestion, we are using ASP .NET MVC.

We area looking for something similar to jscript - getting list of files in directory but I don't want to rely on ActiveX at all. As said before a Firefox-only solution would be OK.

解决方案

In short:You can't get the control to list the files resides on local system(client machine) from browser.

这篇关于列出Web应用程序中的本地目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆