Ftp stream problem

Giganews Newsgroups
Subject: Ftp stream problem
Posted by:  Alex Taylor (bassw…@vnet.hu)
Date: Tue, 15 Jun 2004

Hi All!

I wrote an application that puts some files on ftp servers. I want to
visualize the progress with any type of progressbar. I set the Intercept
property of the TidFtp to an TidConnectionIntercept and wrote the Onsend
event handler. The problem is that the passed AStream1s Size property is
extremely small. For example in case of a ~70KByte of JPeg file it is
always about 23-25 (ie integer value). I don't know what it is the
matter, because with the SMTP component it works wonderfully and they
call the same method - TIdTCPConnection.WriteBuffer - that calls the
Intercept's Send method if the Intercept property is assigned:

          if Assigned(Intercept) then begin
            LBuffer.Position := 0;
            Intercept.Send(LBuffer);
            AByteCount := LBuffer.Size;
          end;

TIA: Alex

Replies