How do I grab a picture form the web?

I need to import some pictures from the web into my datafile and I’m sure it’s pretty simple, but can’t see the way.

I was thinking:
READ PICTURE FILE ( fileName ; picture)

Can someone suggest a way to accomplish this?


You could use http request to give the URL of the picture and you will receive a blob of the image, you can then use blob to document with the right (extension) and you get the file from the web, then you can read the file as an image for 4D if needed.

1 Like

For convenience, HTTP Get is capable of receiving a picture, based on the MIME type given in the response HTTP header, but it is probably better to use BLOB, as suggested, as you will have more control.

1 Like

of course http get :slight_smile: not too awake this morning…

1 Like