1

I'm writing a firefox extension that writes files to a directory structure at a specified location by the user but can't seem to find documentation on how to include that in the permissions of the extension or how to access this facet in the API. I was initially trying to use a greasemonkey script to accomplish this but ran into the javascript limitation of not being able to access the user's local storage and had read I needed to write it as an extension. Any link or help on how to write a function for a mozilla extension that will save a file to a local disk location? Thanks in advance for any help!

Nuvious
  • 1,469
  • 2
  • 12
  • 21
  • Is user not able to change location file is saved at? – guest271314 Jun 04 '16 at 15:30
  • Are you [saving a webpage](http://stackoverflow.com/questions/31593566/save-web-pages-with-firefox-addon-using-file-save-as-pop-up-window/31594925#31594925)/download from a URL ([APIs](http://stackoverflow.com/questions/29003125/is-there-an-api-to-control-downloads-in-firefox-add-on-sdk/29005820#29005820)), or arbitrary data which you are generating? – Makyen Jun 04 '16 at 18:10
  • 1
    I've written code to isolate the download link. From there I want to download that file using the server's file name convention to a user specified directory tree based on content I can farm from the html of the page. The thing I need to do is figure out how to download the file without user prompt. Just hit a button, it analyzes the content on the page and saves it appropriately in the background with a set delay so as not to overload the server. The download part is the thing I'm missing, everything else I can figure out or already have. – Nuvious Jun 04 '16 at 19:22
  • This is how you can do it - http://stackoverflow.com/questions/25492225/how-to-download-image-to-desktop-with-os-file?s=1|2.8871 - this will bypass the download manager. If you want the download manager let me know and I will show you how. – Noitidart Jun 07 '16 at 03:37

0 Answers0