ftp problem

Brad Borch brad at activadesign.com
Wed Jul 20 10:25:46 EDT 2005


Thanks, I'll try your suggestion. I wasn't clear about the result; the 
seconds kept ticking, meaning the repeat look kept looping, even though 
the bytes uploaded were equal to the bytes to be uploaded.

Dave Cragg wrote:
> 
> On 19 Jul 2005, at 18:33, Brad Borch wrote:
> 
>> I have a script to upload a file to an ftp site:
>>
>>   libURLftpUpload compress(fData), myURLstring
>>
>>   repeat while URLStatus(myURLstring) is NOT "uploaded"
>>      put URLStatus(myURLstring) && the long time
>>   end repeat
>>
>> but this is the message I get:
>>
>> uploading, 511814,511814 1:30:32 PM
>>
>> so it looks like the file is completely uploaded, but the server  
>> isn't acknowledging it or something?
> 
> 
> I think what you are seeing is what you would expect. The message is  
> the last status displayed prior to the status changing to "uploaded".  
> Once it changes, your repeat loop will exit and no further status  
> messages will appear.
> 
> However, the repeat loop after the libUrlFtpUpload is not a good  idea. 
> I'm surprised you are even seeing the "uploading" message.  libUrl 
> carries out everything in a normal Rev script. The repeat loop  will run 
> continuouly and block other scripts running.
> 
> The script below is a safer way to handle this:
> 
> on mouseUp ## or in whatever handler
>   libURLftpUpload compress(fData), myURLstring
>   showStatus myURLstring
> end mouseUp
> 
> on showStatus pUrl
>   put urlStatus(pUrl) into tStatus
>   put tStatus
>   if tStatus is not among the items of "uploaded,error,timeout" then
>     send "showStatus pUrl" to me in 50 milliseconds
>   end if
> end showStatus
> 
> 
> Cheers
> Dave
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 




More information about the use-livecode mailing list