Overview
any Filesvoid myFiles.Upload(id: string, options: FileTransferOptions)
Arguments
string id
Id number of file to upload
FileTransferOptions options
Instance of ,file transferring options,. //TODO 1'den fazla kelime linklebilirlik içermeli 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
Code Block | ||
---|---|---|
| ||
var fileId = $Xml.Evaluate('File/FileId'); //Create File Transfer Option.. var fileTransferOptions = { RemoteHostRemoteHost : '192.168.1.28', RemotePathRemotePath : 'testfolder' + '/' + 'testdoc.pdf', UsernameUsername : 'myUsername', PasswordPassword : 'myPassword', ProtocolProtocol : 'FTP' }; //Uploading.. $Files.Upload(fileId, fileTransferOptions) ```` @see {@link FileTransferOptions} |
Examples
...
Code Block | ||
---|---|---|
| ||
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) ```` @see {@link FileTransferOptions` |
Types
FileTransferOptions
...
{ // 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 }