Question

I can't get the File API system to work using any of the tutorials that I've found. I've tried all of these in order to get the code to work.

window.storageInfo.requestQuota(PERSISTENT, size, success, error);

navigator.webkitPersistentStorage.requestQuota(size, success, error);

window.requestFileSystem(window.PERSISTENT, size, success, error);

The first two give me this error:

NotSupportedError: The implementation did not support the requested type of object or operation.

And the last one gives me this error:

SecurityError: It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.

If anyone knows how to fix this, the I would appreciate it. I tried everything I can possibly think of. I thought (--allow-file-access-from-files) might be the solution, but it didn't fix anything.

Was it helpful?

Solution

The SecurityError might be caused by your file not being on a web server. Once your file is on a web server, window.requestFileSystem() should work in Chrome.

OTHER TIPS

This error get's triggered if you run requestQuota in inkognito mode

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top