I've been trying to do some CRUD operations to a local drive using chrome extensions. I understand i won't be able to access the local file system directly, a sandboxed environment will do.
LocalStorage worked for data upto 5 mb. I'll be needing more. I've found that setting "unlimitedStorage" won't grant more to the LocalStorage.
"unlimitedStorage"
Provides an unlimited quota for storing HTML5 client-side data, such as databases and local storage files. Without this permission, the extension or app is limited to 5 MB of local storage.
Note: This permission applies only to Web SQL Database and application cache (see issue 58985). Also, it doesn't currently work with wildcard subdomains such as http://*.example.com.
I've then tried to use the FileSystemApi. But it turned out that only chrome apps can use this api.
As far as i know I'm left with 4 other options:
- WebSQL, which is deprecated.
- IndexedDB, which looks promising
- Application cache, referenced in the notes of the unlimitedStorage description.
- Storage api, Which seems to be available for both extensions and apps
I've got a hunch that indexedDb will allow some form of CRUD. I'm reluctant to use WebSQL as it's deprecated and i've yet to find information about the Application cache, although i doubt that storing data for extensions is within the boundaries of its intended purpose.
Is it possible for chrome extensions to save, load and delete files on the local file system? Am i misinformed about the LocalStorage Limitations or the use of the fileSystem Api in chrome extensions? Will IndexedDB fulfill my needs?