question

becircle avatar image
0 Likes"
becircle asked ·

Backup image from pictureURL

Hi, I called getItem and backup all listing and pictureURL. How can I download and backup the pictures to local storage as well? I try https get to download the image by pictureURL but forbidden. Regards, Bernard
backup
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

swappart avatar image
0 Likes"
swappart answered ·

You could do something like this. Keep in mind though, the image quality of your original image is always going to be better. I store my originals when I list.


URL url = new URL("www.some-picture-somewhere.com");
InputStream in = new BufferedInputStream(url.openStream());
OutputStream out = new BufferedOutputStream(new FileOutputStream("C:/File/To/Save/To/image.jpg"));

for ( int i; (i = in.read()) != -1; ) {
    out.write(i);
}
in.close();
out.close();


· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sanjiv_developersupport avatar image
0 Likes"
sanjiv_developersupport answered ·
Hi @becircle, There is no eBay API right-now through which you can download the pictures and backup them in your system. However, you can store the URL of the picture in text format for future use. Best Regards eBay Developer Support
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.