Uploads data from
System.IO.Stream to a remote file.
For an efficient upload from a physical local file, use
Session.PutFileToDirectory and similar methods instead.
public void PutFile( System.IO.Stream stream, string remoteFilePath, TransferOptions options = null )
Public Sub PutFile( stream As System.IO.Stream, remoteFilePath As String, Optional options As TransferOptions = Nothing )
|string remoteFilePath||Full path to a remote file to upload the data to.|
|TransferOptions options||Transfer options. Defaults to
Session.FileTransferred is raised for the upload. Also raises
Session.FileTransferProgress throughout the transfer.
Streaming is supported with the SFTP and FTP protocols only.
Contrary to some other upload methods, like
Session.PutFiles, this method throws an exception on error automatically.