I have been using this client for some time. It's an awesome library.
I am doing a simple upload via streaming.
Usually, when I am uploading I use the physical path method as I have the file physically.
Currently, I am downloading the file from one location and uploading it to another location.
Using this method avoids creating unnecessary files locally.
I am getting an error on this line.
I am not familiar with the internals but I looking at code.
I think this check is incorrect.
is going to be null in the beginning.
Below is my code for calling this method.
public void UploadFile(Stream stream, string remotePath)
// Setup session options
var sessionOptions = new SessionOptions
Protocol = Protocol.Ftp,
HostName = FtpHostName,
UserName = FtpUser,
Password = FtpPassword
using Session session = new Session();