Not sure why it happens, but to guard against this I would do a SIZE command
on the remote file after uploading it, then check if it matches the local
file size before deleting it.  SIZE is supported by every FTP server I have
used, although I'm not sure if its in the initial FTP RFC.

Dan

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of New Era
Sent: 21 September 2006 12:10
To: twsocket@elists.org
Subject: [twsocket] FtpCli upload problem


         [input]    [input]    [input]    [input]

I am using the following code in the FtpRequestDone event handler;

case RqType of
        ...


    ftpPutAsync: begin
        if(FtpCli.StatusCode= 226) then Delete(FileName);
       ....
    end;

   ....
end;
What I am trying to do is to upload a file to server then delete the 
local file. In fact this code is working for the many cases but there are 
a few cases where the server says that uploaded files (local file sizes 
are greater than 0 bytes) are zero bytes length and the localfile is 
deleted. What is wrong? I am using passive mode.

thanks.
  
                
---------------------------------
 Try the all-new Yahoo! Mail . "The New Version is radically easier to use"
- The Wall Street Journal
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to