Re: How to download an image with libsoup and save it to filesystem in gjs
- From: philip chimento gmail com
- To: Michael Teuscher <mk teuscher gmail com>, javascript-list <javascript-list gnome org>
- Subject: Re: How to download an image with libsoup and save it to filesystem in gjs
- Date: Sun, 11 Jun 2017 00:42:35 +0000
Hi,
Don't forget to reply-all to the list, please — that will help others who run into the same problem.
You aren't using ByteArray correctly there. I suggest double-checking the documentation that I linked.
However, getting the same error actually points to "image.data" being the culprit. Does "image.data" by itself on the line also throw the same exception? It looks like you should use image.get_data() instead, according to the libsoup docs:
http://devdocs.baznga.org/soup24~2.56.0/soup.buffer#method-get_dataThanks for the link, but now the error is getting even worse.
Same line number, same error, completely different code
let a = new ByteArray(image.data.length);
I've got absolutely no clue why
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]