Differences
This shows you the differences between the selected revisions of the page.
2022-06-16 | 2022-10-21 | ||
5.21 stable released (martin) | link update (martin) | ||
Line 1: | Line 1: | ||
====== Session.PutFile Method ====== | ====== Session.PutFile Method ====== | ||
- | Uploads data from [[https://docs.microsoft.com/en-us/dotnet/api/system.io.stream|''System.IO.Stream'']] to a remote file. | + | Uploads data from [[https://learn.microsoft.com/en-us/dotnet/api/system.io.stream|''System.IO.Stream'']] to a remote file. |
//For an efficient upload from a physical local file, use [[library_session_putfiletodirectory|''Session.PutFileToDirectory'']] and similar methods instead.// | //For an efficient upload from a physical local file, use [[library_session_putfiletodirectory|''Session.PutFileToDirectory'']] and similar methods instead.// | ||
Line 23: | Line 23: | ||
==== Parameters ==== | ==== Parameters ==== | ||
^ Name ^ Description ^ | ^ Name ^ Description ^ | ||
- | | System.IO.Stream stream | The [[https://docs.microsoft.com/en-us/dotnet/api/system.io.stream|''Stream'']] to upload the data from. The implementation needs to support only the [[https://docs.microsoft.com/en-us/dotnet/api/system.io.stream.read|''Read'' method]]. The stream is read until the ''Read'' method returns zero or throws an exception. The method does not close nor dispose the stream. | | + | | System.IO.Stream stream | The [[https://learn.microsoft.com/en-us/dotnet/api/system.io.stream|''Stream'']] to upload the data from. The implementation needs to support only the [[https://learn.microsoft.com/en-us/dotnet/api/system.io.stream.read|''Read'' method]]. The stream is read until the ''Read'' method returns zero or throws an exception. The method does not close nor dispose the stream. | |
| string ==remoteFilePath== | Full path to a remote file to upload the data to. | | | string ==remoteFilePath== | Full path to a remote file to upload the data to. | | ||
| [[library_transferoptions|TransferOptions]] ==options== | Transfer options. Defaults to ''null'', what is equivalent to ''new TransferOptions()''. | | | [[library_transferoptions|TransferOptions]] ==options== | Transfer options. Defaults to ''null'', what is equivalent to ''new TransferOptions()''. | |