FTP Component
Manage files and directories on an FTP server
Component key: ftp
Description
The FTP (File Transfer Protocol) component lets you upload, download, move and delete files on an FTP server.
A common integration pattern involves listing files in a file store, and performing a series of actions on the array of files that are returned. See our looping over files quickstart for information about how to create a loop over an array of files.
Connections
Username, password and endpoint
This component supports basic authentication, meaning that you can enter a username and password for authentication, or if your FTP server allows anonymous access you can leave those values blank.
You can enter either an IP address (e.g. 1.2.3.4
) or FQDN (e.g. ftp.example.prismatic.io
) for the FTP's host name.
Most FTP servers run on port 21 and most FTPS (secure) servers run on port 990, though ports are configurable and server administrators can choose to operate on different ports.
Some FTP servers are secure (indicating that they use FTPS rather than FTP). If you are using plain, unsecured FTP select false for secure (though, we recommend encrypting your connection if possible). If your FTP server is set up to use SSL/TLS, you can select true (meaning use "explicit" FTPS) or implicit to use "implicit" FTPS. For information on "implicit" and "explicit" FTPS, see this documentation.
If your component fails to connect, verify the hostname, port and security information with your server's administrator.
On-prem enabled: this connection can be configured to connect to an on-prem resource on a private network. Learn more.
Input | Default | Notes | Example |
---|---|---|---|
Host string / Required host | The address of the FTP server. This should be an IP address or hostname. | ftp.prismatic.io | |
Ignore SSL Errors boolean / Required ignoreSslErrors | false | Ignore SSL errors, like self-signed certificates | |
Password password password | p@s$W0Rd | ||
Port string / Required port | 21 | The port of the FTP server. | 21 |
Secure string / Required secure | false | Specifies whether to use FTPS over TLS. Can be true, false, or implicit, which is for legacy implicit FTPS. | false |
Username string username | john.doe |
Actions
Delete File
Delete a file from a FTP server | key: deleteFile
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Path string / Required path | Path of file to delete | /path/to/file.txt | |
Verbose Logging boolean verbose | false | Enables verbose logging for debugging purposes. | false |
List Directory
List the contents of a directory | key: listDirectory
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Path string / Required path | Path of directory on FTP server to list | /path/to/directory | |
Verbose Logging boolean verbose | false | Enables verbose logging for debugging purposes. | false |
Example Payload for List Directory
{
"data": [
{
"name": "My Folder",
"type": 2,
"size": 0,
"rawModifiedAt": "Feb 8 22:16",
"permissions": {
"user": 7,
"group": 5,
"world": 5
},
"hardLinkCount": 2,
"group": "group",
"user": "owner",
"isDirectory": true,
"isFile": false,
"isSymbolicLink": false
},
{
"name": "FTP Access.docx",
"type": 1,
"size": 13869,
"rawModifiedAt": "Jan 23 16:38",
"permissions": {
"user": 6,
"group": 4,
"world": 4
},
"hardLinkCount": 1,
"group": "group",
"user": "owner",
"isDirectory": false,
"isFile": true,
"isSymbolicLink": false
}
]
}
Move File
Move a file on an FTP server | key: moveFile
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Destination Path string / Required destinationPath | Path of file to move | /my/destination/path.txt | |
Source Path string / Required sourcePath | Path of file to move | /my/starting/path.txt | |
Verbose Logging boolean verbose | false | Enables verbose logging for debugging purposes. | false |
Read File
Read a file from FTP | key: readFile
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Path string / Required inputPath | Path of file on FTP server to read data from | /path/to/file.txt | |
Verbose Logging boolean verbose | false | Enables verbose logging for debugging purposes. | false |
Example Payload for Read File
{
"data": {
"type": "Buffer",
"data": [
101,
120,
97,
109,
112,
108,
101
]
},
"contentType": "application/octet"
}
Write File
Write a file to FTP | key: writeFile
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Data text / Required data | Text to write into the file | ||
Path string / Required outputPath | Path on FTP server to write file | /we/love/commas.csv | |
Verbose Logging boolean verbose | false | Enables verbose logging for debugging purposes. | false |