Skip to main content

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.

Actions

Delete File

Delete a file from a FTP server | key: deleteFile


List Directory

List the contents of a directory | key: listDirectory

Output Example Payload

{
"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


Read File

Read a file from FTP | key: readFile

Output Example Payload

{
"data": {
"type": "Buffer",
"data": [
101,
120,
97,
109,
112,
108,
101
]
},
"contentType": "application/octet"
}

Write File

Write a file to FTP | key: writeFile