Transfer file between mobile device and remote server.
URL to the remote server. Include port number in the URL.
Userid to use to login to remote server
Password for user specified in RemoteServerUser
Fully qualified name of the file to upload
Fully qualified name of the remote file
Upload the file
Download the file
Triggered when file transfer is finished.
Parameters:
Name | Type | Description |
|---|---|---|
Status | Enum | See Status Code |
Message | String |
Define_Com Class(#xDeviceFileTransfer) Name(#FileTransfer)
Evtroutine Handling(#COM_OWNER.Initialize)
#ServerUrl := 'http://10.5.1.270:6501/service/longreach.jsp'
#Userid := 'MYUSER'
#Password := ''
#LocalFile := '/myfiles/file1'
#RemoteFile := '/longreachdata/user/{NAME}/file1'
#Transfer.Enabled := false
Endroutine
Evtroutine Handling(#FileTransfer.Initialize)
#Transfer.Enabled := true
#FileTransfer.RemoteServerUrl := 'http://10.5.1.270:6501/service/longreach.jsp'
Endroutine
Evtroutine Handling(#Transfer.Click)
#FileTransfer.RemoteServerUser := #Userid
#FileTransfer.RemoteServerPassword := #Password
#FileTransfer.LocalFile := #LocalFile
#FileTransfer.RemoteFile := #RemoteFile
If (#Upload.ButtonChecked)
#FileTransfer.Upload
Else
#FileTransfer.Download
Endif
Endroutine
Evtroutine Handling(#FileTransfer.Completed) Status(#lstatus) Message(#lMessage)
#Status := #returnedStatus
If (#Status <> OK)
#StatusMessage := #message
Endif
Endroutine