Uploading

Dave Cragg dcragg at lacscentre.co.uk
Mon Aug 14 17:34:41 EDT 2006


On 14 Aug 2006, at 20:40, Dar Scott wrote:

>
> On Aug 14, 2006, at 1:35 PM, Dave Cragg wrote:
>>> My understanding is that with PUT URL, there is no information  
>>> available about the status of the upload during the upload...  
>>> only at the end. This isn't a big issue for us if it's a more  
>>> dependable way to upload files of this size.
>>
>> You can use libUrlSetStatusCallback (see docs) to get feedback  
>> during the upload. (This works with all three methods.)
>
> How does this work with 'put URL'?

Perhaps I misinterpreted Richard's mail. I assumed that by "put URL"  
he was meaning "put x into url ...". Or am I misinterpreting your  
question too?

Anyway, you can set a callback with libUrlSetStatusCallback and it  
will work with both blocking and non-blocking calls. For example:

## in the stack script

on preOpenStack
   libUrlSetStatusCallback "urlCallback, the long id of this stack
end preOpenStack

on urlCallback pUrl, pStatus
   put pStatus into field "status"
end urlCallback

## and in a button somewhere

put tData into url "ftp://aname:apassword@some.server.com/afile.txt"

Cheers
Dave





More information about the use-livecode mailing list