FTP Component
Manage files and directories on an FTP server
Component key: ftp#
DescriptionThe 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.
#
FTP Connections#
Username, password and endpointThis 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.
Input | Default | Notes | Example |
---|---|---|---|
Input Host string / Required | Default | Notes The address of the FTP server. This should be an IP address or hostname. | Example ftp.prismatic.io |
Input Password password | Default | Notes | Example p@s$W0Rd |
Input Port string / Required | Default 21 | Notes The port of the FTP server. | Example 21 |
Input Secure string / Required | Default false | Notes Specifies whether to use FTPS over TLS. Can be true, false, or implicit, which is for legacy implicit FTPS. | Example false |
Input Username string | Default | Notes | Example john.doe |
#
Actions#
Delete FileDelete a file from a FTP server | key: deleteFile
Input | Default | Notes | Example |
---|---|---|---|
Input Connection connection / Required | Default | Notes | Example |
Input Path string / Required | Default | Notes Path of file to delete | Example /path/to/file.txt |
Input Verbose Logging boolean | Default false | Notes Enables verbose logging for debugging purposes. | Example false |
#
List DirectoryList the contents of a directory | key: listDirectory
Input | Default | Notes | Example |
---|---|---|---|
Input Connection connection / Required | Default | Notes | Example |
Input Path string / Required | Default | Notes Path of directory on FTP server to list | Example /path/to/directory |
Input Verbose Logging boolean | Default false | Notes Enables verbose logging for debugging purposes. | Example false |
#
Output Example Payload{ "data": [ { "name": "example.txt", "size": 123456, "rawModifiedAt": "Wed, 01 Jan 2020 00:00:00 GMT", "isDirectory": true, "isSymbolicLink": true, "isFile": true, "date": "Wed, 01 Jan 2020 00:00:00 GMT" } ]}
#
Move FileMove a file on an FTP server | key: moveFile
Input | Default | Notes | Example |
---|---|---|---|
Input Connection connection / Required | Default | Notes | Example |
Input Destination Path string / Required | Default | Notes Path of file to move | Example /my/destination/path.txt |
Input Source Path string / Required | Default | Notes Path of file to move | Example /my/starting/path.txt |
Input Verbose Logging boolean | Default false | Notes Enables verbose logging for debugging purposes. | Example false |
#
Read FileRead a file from FTP | key: readFile
Input | Default | Notes | Example |
---|---|---|---|
Input Connection connection / Required | Default | Notes | Example |
Input Path string / Required | Default | Notes Path of file on FTP server to read data from | Example /path/to/file.txt |
Input Verbose Logging boolean | Default false | Notes Enables verbose logging for debugging purposes. | Example false |
#
Output Example Payload{ "data": { "type": "Buffer", "data": [ 101, 120, 97, 109, 112, 108, 101 ] }, "contentType": "application/octet"}
#
Write FileWrite a file to FTP | key: writeFile
Input | Default | Notes | Example |
---|---|---|---|
Input Connection connection / Required | Default | Notes | Example |
Input Data text / Required | Default | Notes Text to write into the file | Example |
Input Path string / Required | Default | Notes Path on FTP server to write file | Example /we/love/commas.csv |
Input Verbose Logging boolean | Default false | Notes Enables verbose logging for debugging purposes. | Example false |