I'm currently evaluating the SFTP software and am loving what I've seen so far. However, I'm unable to get UploadAsync (or DownloadAsync for that matter) to work properly. Passing a single memorystream to PutFileAsync works as expected.
Here's the code:
public async Task<Task> TransferDirectoryAsync(string localDirectory, string remoteDirectory)
bool remoteDirectoryExists = DirectoryExists(remoteDirectory);
remoteDirectoryExists = CreateDirectory(remoteDirectory);
Task uploadTask = null;
uploadTask = _sftp.UploadAsync(localDirectory, remoteDirectory, TraversalMode.MatchFilesShallow,
catch (Exception ex)
logger.Write("Exception thrown while transferring file: " + ex.Message);
I have a TransferProgressChanged handler attached and, immediately upon making the call, that fires with a TransferProgressState.TransferCompleted event. Again, I have the exact same logic for PutFileAsync, and it works as expected. Any help would be greatly appreciated. Thanks.