Skip to content

Upload

Uploads the specified file to a remote environment.

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

Parameters

string id
    The ID of the file to upload.

FileTransferOptions options
    An instance of FileTransferOptions containing the transfer settings.

Remarks

If the Port number is specified, passive mode is automatically disabled. To enable passive mode, remove the Port number from the options.

Upload a repository file to an FTP server

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
var fileId = $Xml.Evaluate('File/FileId');

var fileTransferOptions = {
    RemoteHost : '192.168.1.28',
    RemotePath : 'testfolder/testdoc.pdf',
    Username : 'myUsername',
    Password : 'myPassword',
    Protocol : 'FTP'
};

$Files.Upload(fileId, fileTransferOptions);

See Also