Hi, if server does not support SIZE, MD5  then what is the best way to make 
that check?

Arno Garrels <[EMAIL PROTECTED]> wrote:  New Era wrote:
> Thanks for the reply and advice,
> I looked at the component again it contains a property if I am not 
> wrong isSent or named with a similiar name. Looked the property in
> the source code, it also checks the status against 226 and with
> other some constants. Anyway I will do the check you suggested

In the FTP size of an upload is unknown to the server. The server
assumes success when the client closes the data channel gracefully.
So a file may have been corrupted even though you got an OK response. 
The client is responsible to check whether both local and remote
files are the same either by comparing their size or more reliable
by comparing their MD5 checksum (command MD5). Unfortunately MD5 is
not supported on every server.

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html



> 
> 
> 
> Dan wrote: 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:twsocket-
> [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
> 
> 
> 
> ---------------------------------
> All new Yahoo! Mail "The new Interface is stunning in its simplicity
> and ease of use." - PC Magazine 
-- 
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


                
---------------------------------
Yahoo! Messenger  NEW - crystal clear PC to PC calling worldwide with voicemail 
-- 
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