【发布时间】:2015-03-13 11:06:00
【问题描述】:
如何在 NW.js 应用程序中设置 HTML5 文件 API 的配额?
这是我的 package.json
{
"name": "test",
"main": "index.html",
"dom_storage_quota": 1024,
"window": {
"width": 1024,
"height": 600
}
}
当我尝试使用 HTML5 文件 API 保存文件时,我收到 QuotaExceededError 错误。
webkitStorageInfo表示即使设置"dom_storage_quota": 1024后我的配额也是0
window.webkitStorageInfo.queryUsageAndQuota(webkitStorageInfo.PERSISTENT, function(used, remaining) {
console.log("Used quota: " + used + ", remaining quota: " + remaining);
}, function(e) {
console.log('Error', e);
});
已用配额:0,剩余配额:0
【问题讨论】:
标签: javascript html node-webkit nw.js