Back to product page

SftpProgress event


Fires during file transfer.

Syntax

  • Basic
Private Sub object_SftpProgress(User, PositionLo, PositionHi, TotalLo, TotalHi)
The SftpProgress(object,User,PositionLo,PositionHi,TotalLo,TotalHi) syntax has these parts:
objectA wodSSHD object.
UserA SSHUser object. Reference to user who is transferring the file.
PositionLoA Long value. Lower 32bit of current position of file transfer.
PositionHiA Long value. Higher 32bit of current position of file transfer.
TotalLoA Long value. Lower 32bit of total size of file that will be transferred, if known.
TotalHiA Long value. Higher 32bit of total size of file that will be transferred, if known.

Remarks

SftpProgress event is fired during file upload or download. You can track and calculate client's speed using this property.

If user is uploading file, its size is not known before upload is completed - thus Total and Position arguments will always contain same value - total number of bytes uploaded so far. Progress event will be fired until file size exceeds 4.2gb. After that size, Progress64 event will be fired instead.

NOTE: it is possible that Position or Total values become negative - it is because unsigned values are used, but VB (and other environments) expect to see signed values.

Platforms

Windows