Hi Ashwin,
If you use a XHR, you need to send the contents of the file, rather
than the file itself. If you are using XPCOM, as seems to be the case, I
suggest using `OS.File.read` to read the contents of the file, it's
simpler and faster than going through `FileUtils`.
However, I don't suggest using XPCOM for your add-on – it's on the way
out. There may be a way to read local files using the WebExtensions API,
which is way more robust and future-proof. Perhaps using the `downloads`
API [1]?
Cheers,
David
[1]
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/downloads
> _______________________________________________
> dev-extensions mailing list
>
dev-ext...@lists.mozilla.org
>
https://lists.mozilla.org/listinfo/dev-extensions
>