For the entire operation of upload/download it calls
FileTransferProgress
but with
FileProgress=0
until it finishes the upload, then it calls again multiple times incrementing
FileProgress
all at once. Keep in mind that I am running this operation on background thread (not STA), using Windows Desktop WinForms .NET 8 project and connecting to FileZilla Server 1.8.
session.FileTransferProgress += (s, e) =>
{
if (fileTransferState.Canceled)
e.Cancel = true;
fileTransferState.BitesWritten = (long)(fileTransferState.StreamLength * e.FileProgress);
};
session.PutFile(readStream, remotePath);