libURL Question

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm

libURL Question

Post by lohill » Wed Aug 11, 2010 7:43 pm

I am trying to use the libURLDownloadToFile command to save a .jpg image from a website to my computer. I am using the command like this:

libURLDownloadToFile tFileURL, tFileName, "downloadComplete"

where tFileURL is the 'http://' URL to the picture I want to save and tFileName is the name I want to save it under. I have not provided a path for tFileName so I expect the file to be saved in the same directory as my REV application which, in this case, is the desktop. My 'downloadComplete' routine looks like the following:

Code: Select all

on DownloadComplete pUrl pStatus
   If pStatus = "Downloaded" then
      answer  information "Picture saved!"
   else
      answer warning "Picture failed to download."
   end if
end DownloadComplete
I am not absolutely confident of the exact contents of the URL to the picture so have tried a number of possibilities. Some possibilities have answered with 'Picture failed to download' while other attempts have answered with 'Picture Saved!'. In none of the so called successful saves have I been able to locate the picture and multiple saves give me no message about already having been saved. Does anyone have any ideas for how I might make this work?

Thanks,
Larry

lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm

Re: libURL Question

Post by lohill » Wed Aug 11, 2010 11:17 pm

Eureka! They were being saved. They were in my 4.0.0-gm-1 folder

Post Reply