----- Original Message ----- From: <[EMAIL PROTECTED]> > > Vikram, > > I tried your script suggestion. With some modification, I got it to > partially work. I have been referring to the LibUrl documention on the > RunRev site, but I am still having problems. The script below APPEARS to > send a file, and says successful, but the file is always only 58k in size > and is considered corrupt by apps that try to open it. The size "should be" > at least 1 meg. Is something wrong with the syntax here? > > Is urlCallback and showStatus redundant, or do they sometimes provide > different information? >
<snip>libUrl will then send the message at the same time as it updates the urlStatus value.<snip> I think the urlcallback message is more efficient and showstatus is redundant. My *guess* is that when browsers download a large page (like this list) a similar function helps them append the html data progressively.. as the chunks come in... > Kind Regards, > Roger Eller > [EMAIL PROTECTED] > > on mouseUp > put "ftp://tUser:[EMAIL PROTECTED]/test_file.tif" into tUrl > put field "theLocalPath"&"/"&(line 1 of fld "theFileList") into tData > > answer tData&cr&tUrl -- This shows my source & destination > > put EMPTY into fld "Log" of stack "geoFTP" -- clear the log > > put the long id of field "Log" of stack "geoFTP" into tField > libUrlSetLogField tField > libUrlSetStatusCallback "urlCallback", (the long id of stack "geoFTP") > > libURLSetFTPMode "passive" -- a shot in the dark... trying anything > libUrlFtpUpload tData, tUrl The correct syntax in your case should be ***libUrlFtpUploadFile*** because tdata in the above line should have been the binary (binfile url) or contents of the field (but it seem that the field contains the desired filename) but it was just the filename. > on showStatus > end mouseUp > > on showStatus > put "ftp://tUser:[EMAIL PROTECTED]/test_file.tif" into tUrl > put urlStatus(tUrl) into tStatus > put tStatus &cr after fld "Log" of stack "geoFTP" -- show what's > happening > if tStatus is not among the items of "uploaded,error,timeout" then > send "showStatus" to me in 50 milliseconds > end if > end showStatus > > on urlCallback pUrl, pStatus > put pStatus into field "Log" of stack "geoFTP" -- show what's happening > end urlCallback > and by the way, there is an update in my script : on urlCallback pUrl, pStatus put pstatus into fld status ..manipulate the thumbposition of the scrollbar... --if "loading" is item 1 of pstatus then set the thumbpos of sb 1 to (item 2 of pstatus/item 3 of pstatus)*(the endvalue of sb 1-startvalue of sb 1) >>>>> Add the startvalue of sb 1 here and change the status to uploading! if "uploading" is item 1 of pstatus then set the thumbpos of sb 1 to the startvalue of sb 1 +(item 2 of pstatus/item 3 of pstatus)*(the endvalue of sb 1-startvalue of sb 1) end urlCallback Hope it helps.. Regards Vikram _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
