Is it able to test PhoneGap File API with Ripple emulator

半城伤御伤魂 提交于 2019-12-04 07:32:55

Problem found. I need to grant quota before using the PERSISTENT filesystem object. https://developers.google.com/chrome/whitepapers/storage#persistent

// Request Quota (only for File System API)

window.webkitStorageInfo.requestQuota(PERSISTENT, 1024*1024, function(grantedBytes) {
window.webkitRequestFileSystem(PERSISTENT, grantedBytes, onInitFs, errorHandler); 
}, function(e) {
console.log('Error', e); 
});

It seems Ripple-UI didn't do this for me (I checked the source code at lib/ripple/fs.js) . That's why I always get a FileError.QUOTA_EXCEEDED_ERR.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!