Event on UploadFile function

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
pfrossard
Posts: 19
Joined: Thu 08 Apr 2010 09:25

Event on UploadFile function

Post by pfrossard » Wed 23 Jun 2010 11:20

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.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 23 Jun 2010 15:13

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.

pfrossard
Posts: 19
Joined: Thu 08 Apr 2010 09:25

Post by pfrossard » Wed 23 Jun 2010 15:49

I use this event (OnSuccess) but you don't know how many bytes are send !
The event OnData give this information (Offset, Count: Integer) ...

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 24 Jun 2010 09:04

TScSFTPClient sends data by pieces of WriteBlockSize size. Threfore you can consider that Count is equal to the WriteBlockSize property.

pfrossard
Posts: 19
Joined: Thu 08 Apr 2010 09:25

Post by pfrossard » Thu 24 Jun 2010 10:22

That is what I do ...
Thanks.

Post Reply