Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quota exceeded trying to create file with HTML File API

In a packaged Chrome app, I'm trying to read from a file in the PERSISTENT storage, and create it if it doesn't exist:

window.webkitRequestFileSystem(PERSISTENT, 1024*1024, function(fileSystem) {
    fileSystem.root.getFile('file.txt', {create: true}, function(fileEntry) {
        fileEntry.file(function(file) {
            var reader = new FileReader();
            reader.onloadend = function(e) {
                console.log(this.result);
            };
            reader.readAsText(file);
         }, errorHandler);
    }, errorHandler);
});

But I'm getting The operation failed because it would cause the application to exceed its storage quota. error. TEMPORARY storage is giving me the same error. Is there anything I should specify in the manifest.json?

like image 738
supercalifragilistichespirali Avatar asked Mar 17 '14 13:03

supercalifragilistichespirali


1 Answers

Adding unlimitedStorage to the manifest.json permissions fixed the issue.

like image 68
supercalifragilistichespirali Avatar answered Oct 23 '22 17:10

supercalifragilistichespirali