Discuss this help topic in SecureBlackbox Forum

TElSimpleSFTPClient.UploadFile

TElSimpleSFTPClient     See also     


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


Uploads the file.

Declaration

[C#/Java]
    void UploadFile(string LocalFileName, string RemoteFileName);
    void UploadFile(string LocalFileName, string RemoteFileName, bool SuppressAdditionalOperations);
    void UploadFile(string LocalFileName, string RemoteFileName, TSBFileTransferMode Mode);
    void UploadFile(string LocalFileName, string RemoteFileName, TSBFileTransferMode Mode, long RestartFrom);

[VB.NET]
    Sub UploadFile(ByVal LocalFileName As String, ByVal RemoteFileName As String)
    Sub UploadFile(ByVal LocalFileName As String, ByVal RemoteFileName As String, ByVal SuppressAdditionalOperations As Boolean)
    Sub UploadFile(ByVal LocalFileName As String, ByVal RemoteFileName As String, ByVal Mode As TSBFileTransferMode)
    Sub UploadFile(ByVal LocalFileName As String, ByVal RemoteFileName As String, ByVal Mode As TSBFileTransferMode, ByVal RestartFrom As Long)

[Pascal]
    procedure UploadFile(const LocalFileName, RemoteFileName: string);
    procedure UploadFile(const LocalFileName, RemoteFileName: string; Mode: TSBFileTransferMode);
    procedure UploadFile(const LocalFileName, RemoteFileName: string; Mode: TSBFileTransferMode; RestartFrom: Int64);
    procedure UploadFile(const LocalFileName, RemoteFileName: string; SuppressAdditionalOperations: boolean);

[C++]
    void UploadFile(const std::string &LocalFileName, const std::string &RemoteFileName);
    void UploadFile(const std::string &LocalFileName, const std::string &RemoteFileName, bool SuppressAdditionalOperations);
    void UploadFile(const std::string &LocalFileName, const std::string &RemoteFileName, TSBFileTransferMode Mode);
    void UploadFile(const std::string &LocalFileName, const std::string &RemoteFileName, TSBFileTransferMode Mode, int64_t RestartFrom);

[PHP]
    void UploadFile(string $LocalFileName, string $RemoteFileName)
    void UploadFile(string $LocalFileName, string $RemoteFileName, bool $SuppressAdditionalOperations)
    void UploadFile(string $LocalFileName, string $RemoteFileName, integer $Mode)
    void UploadFile(string $LocalFileName, string $RemoteFileName, integer $Mode, integer $RestartFrom)

Parameters

  • LocalFileName - name of the file 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 - ...

Values


Description

    Use this method when you want to upload a file 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:     About file system adapters     DownloadFile     UploadStream     ASCIIMode     FileSystemAdapter     PipelineLength     UploadBlockSize     UseTruncateFlagOnUpload    

Discuss this help topic in SecureBlackbox Forum