1
如何在NW.js应用程序中设置HTML5 File API的配额?在NW.js应用程序中为HTML5 File API设置配额
这里是我的package.json
{
"name": "test",
"main": "index.html",
"dom_storage_quota": 1024,
"window": {
"width": 1024,
"height": 600
}
}
当我尝试使用HTML5文件API,我得到一个QuotaExceededError
错误保存文件。
webkitStorageInfo
表明我的配额是0甚至设置"dom_storage_quota": 1024
window.webkitStorageInfo.queryUsageAndQuota(webkitStorageInfo.PERSISTENT, function(used, remaining) {
console.log("Used quota: " + used + ", remaining quota: " + remaining);
}, function(e) {
console.log('Error', e);
});
使用的额度后:0,剩余名额:0