August 3, 200619 yr Newbies Hi, I'm hoping someone can help. I'm building an image library and I need to be able to check (ie set a field to true or false) if an image exists on a remote server over the internet. eg http://www.site.com/folder/subfolder/image.gif The best solution I've come up with so far is call a shell script that will download the image locally, check if it exists in a specific local location and return yes or no, then delete the local copy. Is there potentially a one step, cleaner solution? This is eventually going to be part of a loop trawling through thousands of images, so the cleaner/faster, the better. I'm using 8.5 Pro on OS X 10.4.7.
August 3, 200619 yr There may be a better way, but I see that curl has an -I option (that's a capital i), which returns only the header of the file. It does not download the file. If file is there, 1st line: "HTTP/1.1 200 OK" Otherwise 1st line: "HTTP/1.1 404 Not Found"
August 4, 200619 yr Author Newbies That's great, I'll experiment with that. This is the first project I've undertaken with 8.5 and I see there's a web viewer field that may also do exactly what I need if I populate it with the image URL. Thanks.
Create an account or sign in to comment