I'm new to Firefox addon development, and it's going well so far, but I'm stuck on how to, essentially, download a file from the Web, given a URI, and save it to disk. Mozilla's MDN documentation has information on how to upload files, but the downloading files section is empty and yet to be written. Sadly, I haven't found any documentation which describes how to do this.
Does anyone know of relevant documentation on how to do this?
The old Facebook Photo Album Downloader addon uses this function call in its overlay JavaScript:
saveURL(images[i].replace(/\/s/g, "/n"), null, null, false, true, null);
Obviously, the first argument is the URI to request. The saveURL
function isn't defined anywhere, so I assume it's an extension API function. I have tried it in my new addon, and it does work. I would, however, like to know what the other arguments mean.