2

I am developing an extension for the chrome browser. I use the KangoExtensions framework. The extension is written in JavaScript. I want to read the content of a file, which is located on the local filesystem. What is the easiest way to implement this?

Ronquam
  • 145
  • 2
  • 13
  • `local file system` is like a ```d:\``` folder or my home directory on linux? Nah, an extension can't see them. You can only have a standard HTML file-upload button or drag'n'drop support. See also [Chrome extensions with text files](http://stackoverflow.com/a/37343166) – wOxxOm Aug 04 '16 at 15:45
  • 1
    Possible duplicate of [Chrome extensions with text files](http://stackoverflow.com/questions/37342661/chrome-extensions-with-text-files) – Haibara Ai Aug 05 '16 at 00:08

1 Answers1

8

If you already know the file's path in the filesystem you just need to add a permission to file://*in your manifest file and make a GET XMLHttpRequest to the url file://{filepath}.

WhiteFangs
  • 664
  • 10
  • 18