4

I am looking to save a file to a local path.

I have the weblink for example (http://www.website.com/files/info.pdf) and a config setting storing the users desired path (defaulted to download directory, but they can change it.

Everything I am reading implies this functionality now exist but I cannot figure out how to do it.

Thanks

Bill Bonar
  • 1,017
  • 2
  • 10
  • 22

1 Answers1

4

Chrome doesn't allow you to write directly to the filesystem. It provides an API that gives you access to a sandboxed environment, but doesn't allow you to access anything outside of that.

Firefox allows filesystem read/write access through XPCOM components, but users must enable access through about:config (can't remember the key offhand, but I'll look and will edit if I find it again).

Demian Brecht
  • 21,135
  • 5
  • 42
  • 46
  • If it is not possible, can i suggest a download directory? using the standard save dialog? – Bill Bonar Nov 21 '11 at 22:28
  • AFAIK it's not possible (mostly due to security concerns I'm sure).. All users have different configurations for their browsers (download destinations, etc).. Mucking with that would be at least frustrating to a user. – Demian Brecht Nov 21 '11 at 22:34