Thanks Charles. I probably won't get all the way back into this until Monday, just FYI.

Also, HostM support has just given me an HTTPS tsnetGetFile download example stack. I tried it and my initial test worked! I still have some experimenting to do with it to find out which tsnetGetFile() settings are required for my case and which ones aren't, but the initial outcome is a great encouragement. (I'll be asking them if I can upload a mod of it to the livecodeshare site.)

Although I've been developing software since the 70s (and maybe because I have been), I still don't know my HTTP headers well at all. That spills over into not knowing exactly what tsnet settings to use in certain cases. I'm pretty sure that has been a large factor in my current challenge.

I'm using LC 9.6.0 on macOS 10.13.6 (my main dev machine) and up (Mojave, Catalina).

Thanks again -
Phil


On 7/18/20 5:10 AM, Charles Warwick via use-livecode wrote:
Hi Phil,

You can use the same command with HTTP, just make sure you set any HTTP headers 
accordingly (similar to tsNetGet).

As for the issues with FTP, which version of LC are you using?

Regards,

Charles

On 18 Jul 2020, at 6:48 pm, Phil Davis via use-livecode 
<use-livecode@lists.runrev.com> wrote:

Hi Charles,

Thanks for the response. Yes, my app is doing what is shown in the lesson 
(using FTP) and it's generally successful as long as the files aren't too 
large. Are you saying I can probably just change the protocol to HTTP and it 
will likely work? I'll try it when I'm not so bleary-eyed (it's almost 2 AM 
here in the US Pacific Northwest).

Phil


On 7/18/20 12:54 AM, Charles Warwick via use-livecode wrote:
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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

--
Phil Davis
503-307-4363


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


--
Phil Davis
503-307-4363


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to