Discuss this help topic in SecureBlackbox Forum

TElSimpleSFTPClient.UploadStream

TElSimpleSFTPClient     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Uploads the stream contents to the remote file.

Declaration

[C#]
    void UploadStream(System.IO.Stream LocalStream, string RemoteFileName, TSBFileTransferMode Mode);
    void UploadStream(System.IO.Stream LocalStream, string RemoteFileName, TSBFileTransferMode Mode, long RestartFrom);
    void UploadStream(System.IO.Stream LocalStream, string RemoteFileName, bool SuppressAdditionalOperations);

[VB.NET]
    Sub UploadStream(ByVal LocalStream As System.IO.Stream, ByVal RemoteFileName As String, ByVal Mode As TSBFileTransferMode)
    Sub UploadStream(ByVal LocalStream As System.IO.Stream, ByVal RemoteFileName As String, ByVal Mode As TSBFileTransferMode, ByVal RestartFrom As Long)
    Sub UploadStream(ByVal LocalStream As System.IO.Stream, ByVal RemoteFileName As String, ByVal SuppressAdditionalOperations As Boolean)

[Pascal]
    procedure UploadStream(LocalStream : TStream; const RemoteFileName : string; Mode : TSBFileTransferMode); overload;
    procedure UploadStream(LocalStream : TStream; const RemoteFileName : string; Mode : TSBFileTransferMode; RestartFrom : Int64); overload;
    procedure UploadStream(LocalStream : TStream; const RemoteFileName : string; SuppressAdditionalOperations : boolean); overload;

[C++]
    void UploadStream(TStream &LocalStream, const std::string &RemoteFileName, TSBFileTransferMode Mode);
    void UploadStream(TStream *LocalStream, const std::string &RemoteFileName, TSBFileTransferMode Mode);
    void UploadStream(TStream &LocalStream, const std::string &RemoteFileName, TSBFileTransferMode Mode, int64_t RestartFrom);
    void UploadStream(TStream *LocalStream, const std::string &RemoteFileName, TSBFileTransferMode Mode, int64_t RestartFrom);
    void UploadStream(TStream &LocalStream, const std::string &RemoteFileName, bool SuppressAdditionalOperations);
    void UploadStream(TStream *LocalStream, const std::string &RemoteFileName, bool SuppressAdditionalOperations);

[PHP]
    void UploadStream(TStream $LocalStream, string $RemoteFileName, integer $Mode)
    void UploadStream(TStream $LocalStream, string $RemoteFileName, integer $Mode, integer $RestartFrom)
    void UploadStream(TStream $LocalStream, string $RemoteFileName, bool $SuppressAdditionalOperations)

[Java]
    void uploadStream(TElStream LocalStream, String RemoteFileName, TSBFileTransferMode Mode);
    void uploadStream(TElStream LocalStream, String RemoteFileName, TSBFileTransferMode Mode, long RestartFrom);
    void uploadStream(TElStream LocalStream, String RemoteFileName, boolean SuppressAdditionalOperations);

Parameters

  • LocalStream - local stream to be uploaded
  • RemoteFileName - remote name of the uploaded file
  • Mode - specifies what to do if the file with the same name already exists
  • RestartFrom - can be used to resume broken transfer operation.When RestartFrom is set to non-zero positive value, the file being transferred is read starting from RestartFrom position and is written also starting from RestartFrom position.
  • SuppressAdditionalOperations - allows to overcome problems with some buggy SFTP servers by suppressing additional file operations.

Values

Description

    Use this method when you want to upload stream contents to remote system. The method uses PipelineLength and UploadBlockSize to calculate the size of the chunks, which are sent to the server. To select ASCII or binary transfer mode use ASCIIMode property.
    In case of error, EElSFTPError exception containing SFTP error code, is raised. For more information on error handling, please read the corresponding how-to article.

See also:     DownloadStream     UploadFile     ASCIIMode     PipelineLength     UploadBlockSize    

Discuss this help topic in SecureBlackbox Forum