简体   繁体   English

如何在Chrome浏览器中将目录的结构传递给ng-file-upload指令?

[英]How to you pass a directory's structure to ng-file-upload directive in Chrome Browser?

Using the following Angular JS directive: https://github.com/danialfarid/ng-file-upload 使用以下Angular JS指令: https : //github.com/danialfarid/ng-file-upload

Wondering if there's a simplified way to pass in the relative path to a file object. 想知道是否有一种简化的方法将相对路径传递到文件对象。 I have checked the following issue: https://github.com/danialfarid/ng-file-upload/issues/285 我检查了以下问题: https : //github.com/danialfarid/ng-file-upload/issues/285

From it, I discovered that I can create a field file._relativePath, but it seems like this variable does not work by itself and I would have to receive it from chrome like this. 通过它,我发现可以创建一个字段file._relativePath,但似乎此变量本身无法运行,因此我必须像这样从chrome接收它

This is less an issue with the project than a question of my experience but I'm wondering how would you be able to combine the two together to get the path for each file in relativePath? 这不是项目的问题,而是我的经验问题,但是我想知道如何将两者结合在一起以获取relativePath中每个文件的路径? Any example or link that explains things beyond 285 to make this easier would really be appreciated. 任何示例或链接都可以解释285之后的内容,以简化此工作,我们将不胜感激。

Apologies if the question is not strong enough or is very similar to another one that's answered. 如果问题不够充分或与所回答的问题非常相似,则表示歉意。 New to asking on Stack Overflow. 询问堆栈溢出的新手。 Constructive feedback is welcome! 欢迎有建设性的反馈!

file.path should be used to retrieve the relative path instead of file.relativePath. 应该使用file.path而不是file.relativePath来检索相对路径。 Check this link for more information. 检查此链接以获取更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM