Files.Upload

Overview

Uploads the specified file to remote environment.

void myFiles.Upload(id: string, options: FileTransferOptions)

Arguments

string id

Id number of file to upload

FileTransferOptions options

Instance of FileTransferOptions

Remarks

If port number is specified passive mode is automatically disabled, to enable it please remove the port number from options.

Example

Uploading file via FTP into a folder located on a remote server

var fileId = $Xml.Evaluate('File/FileId'); //Create File Transfer Option.. var fileTransferOptions = { RemoteHost : '192.168.1.28', RemotePath : 'testfolder' + '/' + 'testdoc.pdf', Username : 'myUsername', Password : 'myPassword', Protocol : 'FTP' }; //Uploading.. $Files.Upload(fileId, fileTransferOptions) `

Types

FileTransferOptions

Options for file transfer operations.

{ // Password to authenticate on remote environment. Optional. Password : string // Port number of remote environment. Optional. Port : number // Protocol to use for file transfer. Optional. Default is FTP. Protocol : ( "FTP" | "FTPS" | "SFTP" | "HTTP" | "HTTPS" ) // IP address or host name of remote environment. RemoteHost : string // Path of file on remote environment. RemotePath : string // Username to authenticate on remote environment. Optional. UserName : string }

Copyright © 2010 - 2023 Emakin. All rights reserved.