File
The File Connector supports reading and writing files locally on the file system, via SMB (Serer Message Block), and FTP.
Connection Settings
Communication Protocol
Specifies the communication protocol used to access the files. The following options are supported.
Option | Description |
---|---|
File Protocol | Used for local directory access. Local in this context means on the same machine the Intelligence Hub is running on. |
SMB | Used to access shared network directories. |
FTP | Access files on an FTP server. |
Communication Protocol: SMB
The following connection settings are available for the SMB protocol.
Setting | Description |
---|---|
Share | Specifies the server and share name of the access shared network directory. Ex. \ServerName\ShareName |
Domain | Specifies the domain of the server used to access the shared network directory. |
Username & Password | Username and password required to authenticate with the share. Leave this blank for anonymous access. |
Communication Protocol: FTP
The following connection settings are available for the FTP protocol.
Setting | Description |
---|---|
Server Type | In most cases this should be set to Unix. In some cases, Windows specific FTP servers may need the Windows option selected. |
Use Passive Mode | In most cases passive mode should be used. Active mode requires the FTP server to connect back to the FTP Client, and is more difficult to configure securely. |
Host | Specifies the hostname of the FTP server. |
Port | Specifies the port of the FTP server. |
Username & Password | Username and password required to authenticate with the share. Leave this blank for anonymous access. |
Common Connection Settings
The following settings are applicable to all protocols.
Setting | Description |
---|---|
File Directory | Specifies the root directory for file processing. |
Processed File Directory | Specifies the directory where files are moved to after processing successfully. This is only used by inputs that enable “Process File”. |
Error Directory | Specifies the directory where files are moved to after processing unsuccessfully. This is only used by inputs that enable “Process File”. |
Input Settings
File Name
The file name to read. This can be the full name of a single file or a regular expression. As an example, (.+) matches any file in the directory.
Use the References panel on the left to explore and drag-and-drop references to other inputs.
Relative Path
The relative path of the starting directory in regards to the connection level File Directory setting.
Process File
When enabled, the file is moved to the connection’s processed directory after being read.
Include Metadata
Include metadata in the read, including file name and the relative file path.
Output Settings
File Name
Specifies the name of the file to write to. This includes the file
extension and directories. The file path can include dynamic outputs (e.g., /{{this.site}}/file.bin
)
Relative Path
The relative path of the starting directory in regard to the connection level File Directory setting.
Payload Reference
When working with complex payloads, this setting uses dynamic outputs to specify the attribute that contains the file payload (e.g. {{this.filePayload}}
.
Note: If left blank, the file connector will write the entire payload out to a file.
Base64 Decoding
When enabled, payloads are base64 decoded before being output as a file. This is used in when receiving Base64 encoded file payloads over other connections such as REST or MQTT.