libURLftpUploadFile limitations

Dave Cragg dcragg at lacscentre.co.uk
Tue Apr 25 16:50:00 EDT 2006


On 25 Apr 2006, at 21:19, Mark Talluto wrote:

> Does anyone know if there are any limitations on how many files can  
> be queued up before failing?

There's no limit defined, so essentially as many as you like.


> I have the following script managing my ftp program and have found  
> that some of the files never get uploaded.  This has been done with  
> file counts in the upper hundreds.  File counts under 100 seem to  
> upload pretty well.
>
> My next guess would be that I need to upload one file at a time and  
> send another file to be uploaded once the first completes.  Would  
> that be the best way to go?
>
>
> --WALK THROUGH ARRAY AND BUILD FULL UPLOAD PATH FOR EACH FILE TO BE  
> UPLOADED
>     put 1 into x
>     repeat aCounter
>         put aInternetPath[x] into tInternetPath
>
>         --CONCANTINATE URL
>         put "ftp://" & tUser & ":" & tPassword & "@" & tServer &  
> "/" & tInternetPath into tMyURL
>         libURLftpUploadFile aFilePath[x],tMyURL
>
>         add 1 to x
>     end repeat
> end beginUpload
>


One problem here is that the script isn't using the optional  
"message" callback parameter. Using a callback would let you know  
whether an error had occurred with any of the uploads. Also, although  
probably not a problem here, you should use "unload url" after using  
libURLftpUploadFile. I see this isn't included in the online docs (I  
think it used to be). There's an example script at the following url:

      http://www.lacscentre.co.uk/liburl/ 
liburldoc.html#libUrlFtpUploadFile


BTW, if the files aren't particularly large, I'd probably upload them  
one at a time using "put". I don't think there's any great speed  
advantage using libURLftpUploadFile. It was added for cases of  
exteremely large files that won't fit in memory.

Cheers
Dave



More information about the use-livecode mailing list