Welcome! Log In Create A New Profile

Advanced

[WB 26]Import Image from URL

Posted by ericus 
[WB 26]Import Image from URL
May 22, 2022 06:49PM
Good day

I hope this is possible. I have a table full of URL's to images i.e. [www.myclient.com]

How can I run through this table and actually either download the images to my computer and save them with the same name, or alternatively get the image and save it in a binary field in my table.

The long and the short of it is I want to get the image and not just have the link to the image.

Thanks in advance


Ericus Steyn
Re: [WB 26]Import Image from URL
May 22, 2022 07:43PM
Hi
If you have an image URL or image path then you can also display an image to the image control


image = www.myclient.com/picture_name.png

[infosonline.net]



Edited 2 time(s). Last edit at 05/22/2022 07:46PM by infos.
Re: [WB 26]Import Image from URL
May 22, 2022 09:52PM
Thanks for the reply.

Yes you would think it is as simple as that but the image is not displayed in the image control.

My code is simply

IMG_Download..Image = product.ImageURL

but it is not displayed.

If I copy the contents of the product.imageURL to Chrome's web address then the image is displayed.

I can't figure out what I'm doing wrong.
Argus
Re: [WB 26]Import Image from URL
May 22, 2022 10:26PM
there are two aspects to your problem, and I'm not sure which one is hard for you

Going through the table is a simple loop
Downloading the image is a simple httprequest+httpgetresult

Neither is complex, so let me know if you need more help
Re: [WB 26]Import Image from URL
May 23, 2022 03:06PM
Where do you actually want your photos to appear?
Is your application Web or Desktop?
You need to make sure that the path is written correctly.

Here is one of my older webdev pages showing the gallery in HTML code.
WebDev on the PHP platform
[www.rajic-plast.com]

[infosonline.net]



Edited 2 time(s). Last edit at 05/23/2022 03:16PM by infos.
Re: [WB 26]Import Image from URL
May 23, 2022 09:38PM
My apologies for the late reply.

This solution works perfectly.

httprequest+httpgetresult

despite the fact that the image won't display in an image control.

Thanks very much
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: