FTP Download Problem

Dave Cragg dcragg at lacscentre.co.uk
Thu Aug 26 02:27:55 EDT 2004


On 25 Aug 2004, at 23:56, Jerry Daniels wrote:

> Gang,
>
> I'm trying to download a stack from my server at IPowerWeb using xTalk 
> in an application, It does not throw an error, but, instead, downloads 
> a file with 0 bytes. My xTalk looks something like this:
>
>     put URL theRemoteURL into URL theLocalURL

One possible problem with this would be using "the result" to track an 
error in the ftp download. After this statement, "the result" will show 
the result of the local URL transaction.

This might be better:

    get URL theRemoteURL
    if the result is empty then
         put it into URL theLocalURL
    else
       answer the result
    end if

As others have said, using libUrlSetLogField will show server 
responses, and may help to indicate a problem.

There is no reason to use libUrlDownloadToFile for small to medium 
sized files (no harm either). It is intended for large files that won't 
fit into memory all in one go.

Cheers
Dave



More information about the use-livecode mailing list