I was trying to create a file using the file system API in chrome. Initially I tried PERSISTENT storage as follows
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
webkitStorageInfo.requestQuota(webkitStorageInfo.PERSISTENT, 1024*1024,
function(grantedBytes) {
window.requestFileSystem(webkitStorageInfo.PERSISTENT, grantedBytes, onInitFs,
errorHandler);
},
errorHandler);
It was working fine initially. But now when I try the same code is giving me the following error
NOT_SUPPORTED_ERR: DOM Exception 9
Then I tried TEMPORARY file storage as follows
window.requestFileSystem(TEMPORARY, 1024*1024, onInitFs, errorHandler);
That is giving me some FileError with the code 2 which means Security Error. Can anyone please help me on these issues?
onInitFscallback doing something illegal with your DOMFileSystem object?webkitStorageInfo.queryUsageAndQuotafunction before requesting for a quota. This is returning 0 bytes as the available bytes. That is the issue i guess. Is there any way to get quota? Why is this 0 for me?unlimitedStorageto your permissions and see if it helps. If not, I'm really not sure what's wrong.unlimitedStoragehelps to get the quota. But still the FileError haunts me when I try to callgetFile