I am writing a Firefox extension, as a part of which i need to download and
save an image file.

I've used the responseText property of XMLHttpRequest and file-output-stream
to download and save simple HTML files. But this technique does not seem to
work with jpeg images. I also tried finding something analogous to the
responseBody property provided by MSCOM, but in vain.

Adding these two lines also doesn't help.
       httpRequest.setRequestHeader ("Content-type", "image/jpeg");
        httpRequest.overrideMimeType('image/jpeg');

what is the difference in code to download and save a plaintext/html file vs
a Jpeg image?

I've been struggling with this for a long time now and would really
appreciate some help on this.

Thanks!


_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to