Page 1 of 1

Event on UploadFile function

Posted: Wed 23 Jun 2010 11:20
by pfrossard
Hi,
When I send a file to a remote server, I have an event OnData and I can do a progress bar ...
But, When I get a file from a remote server (uploadfile) which event can I use for a progress bar ?
Thanks.

Posted: Wed 23 Jun 2010 15:13
by Dimon
The OnData event is arised only on reading file from SFTP server or on dowloading. To process sending data you can use the OnSuccess event.

Posted: Wed 23 Jun 2010 15:49
by pfrossard
I use this event (OnSuccess) but you don't know how many bytes are send !
The event OnData give this information (Offset, Count: Integer) ...

Posted: Thu 24 Jun 2010 09:04
by Dimon
TScSFTPClient sends data by pieces of WriteBlockSize size. Threfore you can consider that Count is equal to the WriteBlockSize property.

Posted: Thu 24 Jun 2010 10:22
by pfrossard
That is what I do ...
Thanks.