Yes I had tried that from a SDKs tab.attach()
content script. For some reason it does not work with blob:
-urls created in the background (opening the same url in a tab works, so the url itself is fine).
Now I just got it working by passing a base64 data-url to the content script; with the obvious performance drawback for large files.
But I will leave it that way for now. I don’t really expect the files (e-books) to get any larger than say 30MB.
The nsIFilePicker
seems a bit overkill to me, considering “downloading” something is an every-day web thing. And I also like to have the possibility to directly open the files, which an nsIFilePicker
approach wouldn’t provide.
But thanks for your time anyway!