FTP Client configuration

A configured File Transfer Protocol (FTP) client is required to make connections to FTP servers.
Template Libraries
contains a runtime script and a widget that allow you to make connections to FTP servers.

Required packages

You must install a stable version of the required NuGet package: FluentFTP. See NuGet packages.

FTP client script

FTPClientLogic
is a runtime script that exposes OPC UA methods to perform file listing and transfer to and from an FTP server.
Configurable parameters include:
  • FtpServerIPAddress
    . IP address of the FTP server.
  • FtpServerPort
    . FTP server port.
  • FtpServerUsername
    . Username used to authenticate the user on the FTP server.
  • FtpServerUserPassword
    . Password used to authenticate the user on the FTP server.
  • OverwriteFileIfExists
    . Determines whether any existing files must be overwritten or not.
  • ClientCertificateFile
    . Server public certificate file, according to standard X509v3 and with .der extension. It must be found in the
    FTOptixApplication/ProjectFiles/PKI/Own/Certs
    folder. If specified, the private key must also be specified. If not specified, it is automatically generated at runtime in the
    FTOptixApplication/ApplicationFiles/PKI/Own/Certs
    folder.
  • ClientPrivateKeyFile
    . Server private key file, with ASCII Base64 encoding and .pem extension. It must be found in the
    FTOptixApplication/ProjectFiles/PKI/Own/Certs
    folder. If specified, the certificate must also be specified. If not specified, it is automatically generated at runtime in the
    FTOptixApplication/ApplicationFiles/PKI/Own/Certs
    folder.
  • UseFtps
    . Determine protocol to use, FTP or FTPS.
The following parameters, to be used as read-only, expose the internal state of the client:
  • FtpClientIsRunning
    . Indicates if the client is connected to an FTP server.
  • FtpClientOperationInProgress
    . Indicates if the client is running some operations, such as file list or file transfer.
Exposed methods include:
  • ConnectFtpClient
    . Connects to the FTP server.
  • DisconnectFtpClient
    Disconnects from the FTP server.
  • DownloadItem
    . Downloads a remote item, such as a file or folder that is contained in the
    remoteItem
    parameter that exists in the
    LocalFolderPath
    folder.  The
    overwriteItemIfExists
    parameter makes it possible to determine whether any existing files should be overwritten or not.
  • UploadItem
    . Uploads the local item, such as a file or folder that is contained in the
    localItemPath
    parameter to the
    remoteFolderPath
    folder. The
    overwriteItemIfExists
    parameter makes it possible to determine whether any existing files should be overwritten or not.

FTP client widget

FTPClientWidget
allows you to list and transfer files to and from an FTP server through a graphical interface.
Configurable parameters include:
  • ServerIPAddress
    . IP address of the FTP server.
  • FtpServerPort
    . FTP server port.
  • Username
    . Username to authenticate on the FTP server.
  • Password
    . Password of the user to authenticate on the FTP server.
  • ClientCertificateFile
    . Server public certificate file, according to standard X509v3 and with
    .der
    extension. It must be found in the
    FTOptixApplication/ProjectFiles/PKI/Own/Certs
    folder. If specified, the private key must also be specified. If not specified, it is automatically generated at runtime in the
    FTOptixApplication/ApplicationFiles/PKI/Own/Certs
    folder.
  • ClientPrivateKeyFile
    . Server private key file, with ASCII Base64 encoding and
    .pem
    extension. It must be found in the
    FTOptixApplication/ProjectFiles/PKI/Own/Certs
    folder. If specified, the certificate must also be specified. If not specified, it is automatically generated at runtime in the
    FTOptixApplication/ApplicationFiles/PKI/Own/Certs
    folder.
  • UseFtps
    . Determine protocol to use, FTP or FTPS.
  • ExtensionFilter
    . Set s one or more filters to view only files with certain extensions. To specify more than one extension, separate the extension with
    ;
    . For example, use
    .txt;.csv
    to display only files with
    .txt
    and
    .csv
    extensions. Use
    .
    to show files of all extensions.
  • ShowHiddenFiles
    . Specifies whether to show hidden files. This setting does not apply on remote file systems of Windows FTP servers.
  • StartLocalFilesystemPath
    . Specifies the starting folder to browse the local filesystem.
  • AccessFullFilesystem
    . Determines whether to allow full filesystem browsing. This option is only supported for Windows and Ubuntu systems. You can browse from the root of the disks on Windows and from the
    /
    (root) folder on Linux.
  • AccessLocalNetworkDrives
    . Show s the network drives mapped using this setting when
    AccessFullFilesystem
    is enabled in the Windows operating system.