FTP via "put" opens files but fails to write data?

Sivakatirswami katir at hindu.org
Tue Feb 7 23:38:55 EST 2006


This FTP script below frequently fails

I get three files on the server with the correct name, but no data is  
written to them....

I suspect this repeat needs to "wait" or something until one FTP  
transaction complete...I have other scripts that use    
libUrlFtpUploadFile tFilePath, tUrl, "loadDone"  that will probably  
fix it.. but I would like to know from "under the hood" the reason if  
fails.

--> this script uploads three small backgroundimages
on uploadImages
put empty into fld "ftp log"
    put the long id of field "ftp log" into tField
       libUrlSetLogField tField
       LibUrlSetFTPMode "Active"
       set the socketTimeoutInterval  to 20000


  put "binfile:/Volumes/LAN/Web-Mirrors/www.himalayanacademy.com/taka/ 
images/taka_04_10_15/" into tLocalLocation
  put "ftp://USER:PASS@69.94.64.57/../../html/taka/images/ 
taka_04_10_15/" into tRemoteLocation
  put "bg-top.jpg,bg-bottom.jpg,symbol.jpg" into tImages

  repeat for each item x in tImages
    put url (tLocalLocation & x) into url (tRemoteLocation & x)
  end repeat
end uploadImages

the FTP transaction log doesn't really answer the question...


sivakatirswami






More information about the use-livecode mailing list