我如何使用angularJs打开本地目录? [英] How can i open local directory using angularJs?

查看:477
本文介绍了我如何使用angularJs打开本地目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要求,其中用户将首先创建一个文件,然后我将开始将数据记录到该文件中,我如何提示窗口,以便用户可以浏览到本地目录并保存他们选择的位置文件?

b
$ b

实现这一点的任何角度方式?

main.html

 < button type =buttonclass =btn btn-successng-click =recordLogs()> record< / button> 

ctrl.js

  $ scope.recordLogs = function(){
window.open(C:///);


解决方案

无法访问文件系统。然而,您可以在服务器上执行此类操作,然后将文件作为下载文件输出到客户端。



如果应用程序是内部的,那么它可能是它所在的服务器/服务器场可以通过网络访问用户系统,在这种情况下,您可以通过ssh等相应地保存和更新文件。



用户系统需要拥有已知的访问权限,Active目录,系统管理员帐户等。

I have a requirement where user will create a file first then I will start logging data into that file, How can i prompt window so user can browse to local directory and save file with their choice of location ?

Any angular way of implementing this ?

main.html

<button type="button" class="btn btn-success" ng-click="recordLogs()">record</button>

ctrl.js

$scope.recordLogs = function(){
        window.open("C:///");
    }

解决方案

Not possible, The client does not have access to the file system. You could however do something like this on the server and then output the files as downloads to the client.

If the application is internal then maybe the server/farm it lives in has network access to the users system in which case you could save and update the files accordingly over ssh etc.

The users system will need to have known credentials for access, Active Directory, system admin account, etc.

这篇关于我如何使用angularJs打开本地目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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