6

我在浏览器平台上使用最新的科尔多瓦(我知道这是一些相当实验性的)。

我需要在cordova.file.dataDirectory目录中读写。在 Chrome 中正确触发了 filePluginIsReady 事件,我将读/写操作放在它的回调中。

我使用cordova-plugin-file(最新),在 Firefox 和 Internet Explorer 11 上运行良好,但在 Google Chrome 上,调用window.resolveLocalFileSystemURL总是引发这个FileError

代码:2 消息:“确定某些文件在 Web 应用程序中访问不安全,或者对文件资源进行了太多调用。” 名称:“安全错误”

我仔细阅读了 cordova-plugin-file README 和关于浏览器和 chrome 的怪癖(授予大配额,初始化文件系统)。

向 chrome 启动器添加 --allow-file-access 选项无助于访问文件系统:file:///persistent/。

使用 cordova-plugin-file 中的 Chrome 特定代码,我希望它能够完美运行。有什么线索吗?

4

0 回答 0