Question

I want to save/load files from my extension (sandbox or not, no matter). But I can't use "file:///*" permission because Chrome Web Store don't allow it. I can't use "fileSystem" permission because "the permission allowed only for packaged apps". I would convert gladly my extension to app but apps can't have a browser_action button which I need too. Well, is there another way to use file system and browser_action button simultaneously?

Était-ce utile?

La solution

Not sure if you found your solution or not. Have you tried using the File API: Directories and System API?

In April 2014 it was announced as dead

Work on this document has been discontinued and it should not be referenced or used as a basis for implementation.

But it still functions in Chrome v36. If this is something that you're wanting to use for a personal project, then it should be sufficient. Not sure if you'd want to rely on this API if you plan on releasing it to others, as Chrome could remove support for it. If you do release to others, at least do feature detection to ensure their browser supports it.

Here's a tutorial on exploring the filesystem api. I have not used this with an extension.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top