Problem downloading files from a website

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Hunam
Posts: 8
Joined: Wed May 29, 2019 9:08 am

Re: Problem downloading files from a website

Post by Hunam » Wed May 29, 2019 4:57 pm

Indeed they show me the LiveCode installation folder, but how do I change it to make it my download folder so?

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Problem downloading files from a website

Post by Klaus » Wed May 29, 2019 5:06 pm

You could ask the user/yourself where to put the file and use the result in your download handler:

Code: Select all

...
answer folder "Please select a folder to download the file to:"

## User/you clicked CANCEL:
if it = EMPTY then
  exit to top
end if

## The chosen folder is now in the variable IT
put it into tFolder

## Now you can use this to concatenate the correct filename for your downloaded file:
libURLDownloadToFile "ftp://username:password@ftpupload`.`net/htdocs/test-file.psd",(tFolder & "/test-file.psd"),"download_done"
...
And please check the link that bogs provided in his first answer.
Looks like I already gave a lot of related answers to this problem about 9 years ago. :-)

Hunam
Posts: 8
Joined: Wed May 29, 2019 9:08 am

Re: Problem downloading files from a website

Post by Hunam » Wed May 29, 2019 5:13 pm

Thanks a lot, thanks for all of your help :wink:

Post Reply

Return to “Internet”