Contact Us 1-800-596-4880

FTP Connector

Anypoint Connector for FTP (FTP Connector) implements a file transport channel so that your Mule application can exchange files with an external FTP server. You can configure FTP as an inbound endpoint that receives files or an outbound endpoint that writes files to the FTP server.

Installation

  1. In Anypoint Studio, click the Exchange icon in the Studio taskbar.

  2. Click Login in Anypoint Exchange.

  3. Search for the connector and click Install.

  4. Follow the prompts to install the connector.

When Studio has an update, a message displays in the lower right corner, which you can click to install the update.

Configuration

FTP endpoint configuration consists of two stages:

  1. Decide where you want to place the FTP endpoint within your Mule flow, then drag it from the palette to the appropriate place in the sequence of building blocks that make up your Mule flow.

    1. If you place the FTP endpoint at the beginning of the flow, it acts as an inbound endpoint (such as, message source), triggering the flow whenever it receives a file. (You can also use the Composite Source scope to wrap the FTP endpoint along with other, similar endpoints (such as SFTP, File, or UDP) so that your flow can receive files through multiple transport channels).

    2. If you place the FTP building block in the middle or at the end of the flow, it serves as an outbound endpoint, transferring files out of the flow to the connected file system (such as, the FTP server).

  2. Configure the FTP endpoint by providing values for the fields on the various tabs in the properties editor, which you open by clicking the FTP endpoint icon on the Message Flow canvas.

The tabs on the FTP properties editor display the various attributes you can configure for this endpoint.

General Tab

This tab covers the attributes users most frequently choose to set. None are required for this particular tab, since Mule uses a default value whenever a user declines to set an attribute manually.

general_tab
Property Description

Display Name

Defaults to the generic endpoint name (FTP). MuleSoft recommends that you change this display name, which must be alpha-numeric, to reflect the endpoint’s specific role, such as File Entry Endpoint.

Host

Defaults to localhost. Enter the Fully Qualified Domain Name (FQDN) or IP address of the server on your host machine that connects to the external FTP server.

Port

The port that connects to the local (host) server. (such as, 21)

Path

Specify a path that facilitates connection to the local server so that you don’t have to provide a username and password.

User

The username for authentication on the host server.

Password

The password for authentication on the host server.

Transfer Mode

Select either the Binary or ASCII radio button to specify a file transport encoding. Binary is the default.

Use Passive Mode

If the client is behind a firewall, check this box to enable the passive protocol. Passive mode is active by default.

Connector Configuration

Click to display the dropdown list and select a previously configured global connector configuration to associate with this particular endpoint instance. Alternatively, click the pencil icon to modify one of these previously created global connectors. If you have not yet created any global connector configuration for FTP endpoints, you can do so now by clicking the green plus icon (+), then completing the fields on the various tabs of the FTP Global connector Properties.

Polling Frequency

(Applies to inbound FTP endpoints only.) For an inbound FTP endpoint, this field specifies how often to check the external FTP server for new (incoming) data. The default value is 1000 ms.

FTP Output

(Applies to outbound FTP endpoints only.) In the text box labeled Pattern, enter the pattern the endpoint should use when writing files to disk. Select the pattern from the list of file-name parser patterns, which you configure in the connector associated with this endpoint.

Advanced Tab

adv_tab
Property Description

Address

Enter the address for this endpoint, such as ftp://user:password@localhost:21/path.

Response Timeout

Specify how long the endpoint must wait for a response (in ms).

Encoding

Choose from a drop-down list the character set used for message data. (such as UTF-8).

Disable Transport Transformer

Check this box if you do not want to use the endpoint’s default response transport.

MIME Type

Select from the dropdown list one of the formats this endpoint supports.

Connector Endpoint

Use the drop-down list to select one of the previously configured global endpoint templates, if any exist. Alternatively, click the pencil icon to modify one of these previously created global endpoints. If you have not created any global endpoint for this type of endpoint, you can so by clicking the green plus icon (+), then completing the fields on the window that appears.

Transformers Tab

transf_tab
Field Description

Request Transformer References

Enter a list of synchronous transformers that are applied to the request before it is sent to the FTP transport.

Response Transformer References

Enter a list of synchronous transformers that are applied to the response before it is dispatched from the FTP transport.

See Also