iOS上的PouchDb大型附件

时间:2017-06-15 11:37:09

标签: ios ionic2 attachment pouchdb

我有一个混合应用程序(Ionic 2),它将文件作为附件存储在PouchDb中。我在iOS上遇到问题,其中大于~50mb的附件(blob格式)在调用putAttachment时导致崩溃。我已经阅读了很多关于配额等的内容。结果我使用了cordova-sqlite适配器我已经尝试了Cordova-sqlite-storage和cordova-plugin-sqlite-2插件)对于iOS。我认为这应该解决任何配额问题。或者这不适用于附件?不幸的是,我没有收到任何错误/异常消息,以帮助进一步调试。任何指针都赞赏。

    self.db.post(navItemFile).then(function (response) {
        let newDocId = response.id;
        self.db.putAttachment(newDocId, fileName, response.rev, blob,   contentType).then(function () {
            resolve(newDocId);
        }).catch(function (err) {
            Raven.captureException(err);
            resolve(newDocId);
        });
    });

0 个答案:

没有答案