Page 1 of 1

libURL Question

Posted: Wed Aug 11, 2010 7:43 pm
by lohill
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

Re: libURL Question

Posted: Wed Aug 11, 2010 11:17 pm
by lohill
Eureka! They were being saved. They were in my 4.0.0-gm-1 folder