Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 File API NotSupportedError

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.

like image 556
Joshua Harris Avatar asked Apr 17 '26 22:04

Joshua Harris


1 Answers

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.

like image 138
embden Avatar answered Apr 19 '26 12:04

embden



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!