使用javascript / html5 / angularjs / jquery读取包含文件/子文件夹的文件夹的内容

时间:2015-08-18 16:49:47

标签: javascript jquery angularjs html5

我想阅读通过<input type="file">

选择的文件夹下的文件和子文件夹

我知道我可以使用<input type="file" multiple webkitdirectory />。由于此解决方案是特定于铬的,因此我无法使用它。

我已在网上广泛搜索,但未找到适合所有浏览器使用javascript,html5,angularjs或jquery读取所选文件夹的文件/子文件夹的解决方案。

请告知如何实现此功能。

1 个答案:

答案 0 :(得分:0)

取自here

目前仅在Chrome和Opera上支持FileSystem API http://caniuse.com/#feat=filesystem

此外,您还需要获取用户访问权限的权限。

有关详细信息,请参阅此文章: https://www.html5rocks.com/en/tutorials/file/filesystem/#Reading目录的内容