Quantcast
Viewing all articles
Browse latest Browse all 9

Check and download images

In the following code you can see how to make a conditional download of images.
Let's assume you have a list of image files in a table (from a database, for instance, but any other source will do as well) and the folder on the remote website where the images are.

Those data are set in the very beginning of the file, the only external object you have to instantiate before calling this function is the dataset called dsImgs. Once done, the function will look for all the images in the location and will check if the image already exist on the disk. If this is the case, a check is done on the Last-Modified date and the file is downloaded if the current version is older only.


Viewing all articles
Browse latest Browse all 9

Trending Articles