Re: How to check if file was successfully uploaded to ftp server (CRC check)?

Giganews Newsgroups
Subject: Re: How to check if file was successfully uploaded to ftp server (CRC check)?
Posted by:  Remy Lebeau (Indy Team) (no.spam@no.spam.com)
Date: Tue, 30 Jan 2007

"Janne" <olmy@nopleasespam_iki.fi> wrote in message
news:op.tmy3i5sh7ksiā€¦@cs181144175.pp.htv.fi...

> Hello everyone. I don't know what is causing this, but when I
> download files that I have uploaded with indy IdFTP 9.00.10 I
> sometimes get a corrupted file and it seems that the file was
> corrupted while uploading, since the problem dosen't go away
> after repeated downloads. How can I do a  CRC test after
> upload or something??

Indy 9 does not natively support CRC checking.  So you will have to
implement the CRC32 algorithm in your own code.  Sample code is
readily available online.  After the upload finishes, get the CRC hash
for your local file, and then use the TIdFTP.Quote() method to send a
'XCRC filename' command to the server to get the CRC hash of the
remote file.  You can then compare the two values.  Also, you should
send the 'FEAT' command to the server after connecting in order to
check if the server even supports the XCRC command in the first place.

Gambit

Replies

In response to

How to check if file was successfully uploaded to ftp server (CRC check)? posted by Janne on Tue, 30 Jan 2007