Re: FTP Server File Event

Giganews Newsgroups
Subject: Re: FTP Server File Event
Posted by:  Remy Lebeau (TeamB) (
Date: Tue, 14 Dec 2004

"Roberto Stern" <rober…> wrote in message

> Does anybody know a way to check  FileStart, FileProccess and
> FileEnd when processing a Store or Retrieve file to and from a
> idFtpServer.

There are no provisions for that in TIdFTPServer.  The only way to track
file progress is to write your own TStream descendant class that performs
the needed tracking internally.

> I tried setting  doing the folowing in the
> TMainForm.FTPServerAfterUserLogin
>    Asender.Connection.OnWorkBegin := DoIOBegin;
> But it does not work.

You are accessing the wrong connection to begin with.  Transfers are
performed on separate connections than the one that receives commands from
the client.  In the OnAfterUserLogin event, you are accessing the command
connection, not the data connection, which does not even exist yet until a
transfer is actually being performed.




In response to

FTP Server File Event posted by Roberto Stern on Tue, 14 Dec 2004