I have a simple question. I work with Delphi 2010.
I have an FTP client inside my software. When I do work with an IIS-based FTP, it works OK.
I changed my FTP server last week. Now I have a Linux server with ProFTPD.
When I do work with this FTP server, it works, but it downloads corrupted files.
I've noticed using the debugger that the function idFTP.Size returns -1. So, I use the Size number, returned by the Indy FTP directory parser when I idFTP.list the files. Using this way, files are downloaded in a corrupt state.
However, using other FTP programs, files are downloaded ok.
with idFTP1 do
begin
AutoLogin := False;
IPVersion := Id_IPv4;
Passive := True;
TryNATFastTrack := true;
Port := 21;
Host := '192.168.121.221';
Username := 'flxupgrader';
Password := 'avaricia';
Connect;
login;
TransferType := ftBinary;
BeginWork(wmRead);
Get('/_Enterprise/141010.zip',
'E:\Usuarios\Pablo\141010.zip');
EndWork(wmRead);
Disconnect;
end;
When I execute this code using the FTP server in my Linux with ProFTP FTP server, my ZIPs are downloaded corrupted. You can not extract anything from it, "CRC error".
Important: Using Windows Explorer to access the FTP server to download a file: it works ok. The file is 24525K. Using my program with Indy 10 to download that file, the downloaded file is 24616K and it is corrupt.