A Chrome app or extension cannot access the local file directly, as this would be a serious security breach. Of course, this limitation can be circumvented , as I was explained on stackoverflow via Native host . True, I personally did not try to do this, since I solved my problem simply by storing local files inside Indexed BD. Read more about all the ways I know how to store files and follow up with them, read on.
Work with files through Indexed BD.
- How to save file in indexedbd? An answer with explanations here .
- How to get the file over the network and save to indexedbd? The answer is here .
We use FileSystem API for saving and working with files.
Local Storage & Session Storage & Cookie Storage
You can get the files (their objects) to work with them via drag & drop or <input type="file" /> . You can read more about how this is done with examples and subsequent debriefing here .
I hope that the answer explained at least superficially about working with files in applications and Google Chrome extensions.