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 theFTOptixApplication/ProjectFiles/PKI/Own/Certsfolder. If specified, the private key must also be specified. If not specified, it is automatically generated at runtime in theFTOptixApplication/ApplicationFiles/PKI/Own/Certsfolder.
- ClientPrivateKeyFile. Server private key file, with ASCII Base64 encoding and .pem extension. It must be found in theFTOptixApplication/ProjectFiles/PKI/Own/Certsfolder. If specified, the certificate must also be specified. If not specified, it is automatically generated at runtime in theFTOptixApplication/ApplicationFiles/PKI/Own/Certsfolder.
- 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.
- DisconnectFtpClientDisconnects from the FTP server.
- DownloadItem. Downloads a remote item, such as a file or folder that is contained in theremoteItemparameter that exists in theLocalFolderPathfolder. TheoverwriteItemIfExistsparameter 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 thelocalItemPathparameter to theremoteFolderPathfolder. TheoverwriteItemIfExistsparameter 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.derextension. It must be found in theFTOptixApplication/ProjectFiles/PKI/Own/Certsfolder. If specified, the private key must also be specified. If not specified, it is automatically generated at runtime in theFTOptixApplication/ApplicationFiles/PKI/Own/Certsfolder.
- ClientPrivateKeyFile. Server private key file, with ASCII Base64 encoding and.pemextension. It must be found in theFTOptixApplication/ProjectFiles/PKI/Own/Certsfolder. If specified, the certificate must also be specified. If not specified, it is automatically generated at runtime in theFTOptixApplication/ApplicationFiles/PKI/Own/Certsfolder.
- 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;.csvto display only files with.txtand.csvextensions. 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 whenAccessFullFilesystemis enabled in the Windows operating system.
ftp client
Provide Feedback