Shazeb
Shazeb

Reputation: 19

Issue with Indy FTP component

I am using Delphi 6 with Indy FTP component, having an issue with transferring files over 2GB. Small files are working fine.

Has anyone faced similar issues like that?

UPDATE:

There is one issue after upgrading from Indy 9 to Indy 10. This code no longer compiles:

TbaseFTP = Class(idftp) 
Private 
  Jonwrite : TFTPDataLogEvent; 
  Jonread : TFTPDataLogEvent;

Public 
  Procedure WriteLn(Const POut : string = ''); Override; 
  Function ReadLn(PTerminate : string = LF; const Ptimeout : Integer = IdTimeoutDefault; PMaxllength : integer = -1):string ;override;

Implementation

Procedure TbaseFTP.writeLn(Const Pout : string = '');
Begin 
  if assigned (JOnWrite) then 
    JonWrite(Pout);
  inherited; 
End;

Upvotes: 0

Views: 326

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 598001

You are using Indy 9, which is a very old version of Indy that is no longer supported by the Indy team. That version of Indy indeed had a 2GB limitation on file transfers.

Although Delphi 6 was the version that introduced 64-bit streams, Indy 9 (specifically, the WriteStream() and ReadStream() methods of TIdTCPConnection, which TIdFTP uses for its transfers) never supported 64-bit streams.

If you need to handle file transfers > 2GB, you will have to upgrade to Indy 10 (or else forgo TIdFTP and implement the FTP protocol manually, then you can handle transfers however you want).

Indy 10 still supports back to Delphi 5. Note that support for pre-Unicode compilers will be dropped in Indy 11.

UPDATE: as for your compiling error, it is because you are overriding methods which no longer exist in the base TIdTCPConnection class, they were moved to the TIdIOHandler class in Indy 10. So you will need to update your code accordingly. If you want to capture all of the commands and responses that TIdFTP sends/receives, you should override the virtual SendCmd() and GetResponse() methods, or else assign a TIdConnectionIntercept-derived object to TIdFTP's Intercept property.

Upvotes: 1

Related Questions