Progress Bar

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
firstfriday
Posts: 3
Joined: Tue 15 Mar 2016 15:59

Progress Bar

Post by firstfriday » Tue 29 Mar 2016 17:24

hello,
how can I implement a progress bar during upload (and downloading) a large file in blocking mode
I played around with onData (not fired) and AfterWriteData(not explained in you help file)
Please an example
Thanks.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Progress Bar

Post by ViktorV » Thu 31 Mar 2016 08:43

The OnData event is raised only on reading a file from SFTP server or on downloading. To process sending data you can use the AfterWriteData event.
The AfterWriteData event occurs after data is written to a remote file when executing the WriteFile method. TScSFTPClient sends data by pieces of TScSFTPClient.WriteBlockSize size on uploading file, therefore the AfterWriteData event may occur several times during one call of this method.
Parameters:
FileName - the name of the file in which the data is being written.
Handle - the handle for the file that was sent to the WriteFile method.
Buffer - the buffer which holds the data written to the file. It can hold a nil value if EOF = True.
Offset - the position in the buffer that indicates the beginning of the written data.
Count - the amount of data sent in bytes.
EOF - indicates that the end of file was reached. If its value is True, the end of file was reached. Otherwise it was not reached.
We will add description of the AfterWriteData event handler in the next SecureBridge build.

Post Reply