tsnetGetFile() example using HTTP?

Charles Warwick charles at techstrategies.com.au
Sat Jul 18 03:54:42 EDT 2020


Hi Phil,

Does this lesson help you?

http://lessons.livecode.com/m/4071/l/853715-how-to-asynchronously-download-via-sftp-directly-to-a-file

It uses SFTP with tsNetGetFile, so while the protocol used is different, the concept is the same.

Regards,

Charles 

> On 18 Jul 2020, at 5:17 pm, Phil Davis via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> 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
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 



More information about the use-livecode mailing list