Saving internet URL image to local file

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Nonsanity
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 86
Joined: Thu May 17, 2007 9:15 pm
Location: Maryland, USA
Contact:

Saving internet URL image to local file

Post by Nonsanity » Thu May 08, 2008 11:18 pm

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...)
~ Nonsanity
~ Chris Innanen

Nonsanity
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 86
Joined: Thu May 17, 2007 9:15 pm
Location: Maryland, USA
Contact:

Post by Nonsanity » Thu May 08, 2008 11:28 pm

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. :)
~ Nonsanity
~ Chris Innanen

Post Reply

Return to “Internet”