Page 1 of 1

Saving internet URL image to local file

Posted: Thu May 08, 2008 11:18 pm
by Nonsanity
I thought I knew how to save an image with an internet URL to a local file, but I'm just getting garbage files from the following code:

Code: Select all

put "http://webaddress.foo/my_image.jpg" into image_url
put url image_url into url ("binfile:my_image.jpg")
I'm guessing I'm making a "stupid" mistake here, so I turn to other eyes... :)

(The URL and pathname are fake. There is no "foo" top level domain...)

Posted: Thu May 08, 2008 11:28 pm
by Nonsanity
Yup! Stupid mistake. I was passing the wrong URL! (The URL of the page the image was being extracted from, and not the image url itself.)

So... Nevermind. :)