tsnetGetFile() example using HTTP?

Phil Davis phil at pdslabs.net
Sat Jul 18 03:17:03 EDT 2020


Does anyone have an working example stack you're willing to share where 
'tsnetGetFile' or 'tsnetGetFileSync' is using HTTP (or HTTPS) to 
download a file? I have had limited success using FTP but it 
consistently fails (in my situation at least) when files are bigger than 
200-300 MB (depending I guess on network traffic at that moment, or ???).

Today I started with the example described in the lesson:
http://lessons.livecode.com/m/4071/l/945907-how-to-download-multiple-files-in-the-background-with-tsnet

The example uses HTTP via 'tsnetGet' to download the text of web pages 
into a variable, and then uses "put tData into url ("file:" <path>)" to 
make the files. In my real-world situation I can't do that. My actual 
downloads are binary files that can be over 1 GB. I need to download 
them as files to the local disk, so for me 'tsnetGet' is out.

There are no tsnet examples on http://livecodeshare.runrev.com/ so I'm 
turning to you (which I should have done earlier).

(Is there anywhere else I should look for examples? I did look on 
stackexchange and stackoverflow but no joy.)

Thanks for any and all responses.

-- 
Phil Davis
503-307-4363





More information about the use-livecode mailing list