I am using Delphi 7, Indy components with TCPClient and TCPServer for file transfer.
I transfer various size files. Happily from your answered questions I saw that I have to exclude
AThread.Connection.OpenWri
teBuffer; and
AThread.Connection.CloseWr
iteBuffer;
and get something like
//AThread.Connection.OpenW
riteBuffer
; and
AThread.Connection.WriteSt
ream(FileS
tream);
//AThread.Connection.Close
WriteBuffe
r;
for large files so they are not written in one chunk. Now that I've left only the
AThread.Connection.WriteSt
ream(FileS
tream);
my question is how I can get from there the percentage of the written file to show it on a progress bar on the uploader side, as well how to show a progress bar for the download on the client side.
What I got on the client side is...
FileStream:= TFileStream.Create(fname, fmCreate);
while connected do
ReadStream(FileStream, -1, true);
FreeAndNil(FileStream);
so, how do I get a progressbar from there?
Start Free Trial