【问题标题】:Both error and success callbacks in the same write同一写入中的错误和成功回调
【发布时间】:2015-06-23 03:09:03
【问题描述】:

使用FileWriter 保存文件时,错误和成功回调都会触发。这只发生在某些 android 设备(v4.3 和 v5)上,而在其他设备上工作。插件版本为2.0.0

FileError 的代码为 6,即“NO_MODIFICATION_ALLOWED_ERR”。

这里有一些代码:

this.cwd.getFile(id, {create: true}, function(file) {
    file.createWriter(function(writer) {

        writer.onerror = fail;

        writer.onwriteend = function() {
            success(id, file.toURL());
        };

        writer.write(blob);

    }, fail);
}, fail);

插件中的错误?

【问题讨论】:

    标签: android cordova cordova-plugins html5-filesystem


    【解决方案1】:

    该死的!插件 v2.1 可用并解决了问题...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-17
      • 2020-09-07
      • 1970-01-01
      • 2011-07-25
      • 2017-08-09
      • 1970-01-01
      相关资源
      最近更新 更多