Contact Us 1-800-596-4880

Connect to an FTP Server Example - Mule 4

To configure the global element to connect to an FTP server, follow these steps:

  1. Select the name of the connector in the Studio canvas.

  2. Select the operation in the Studio canvas.

  3. In the configuration screen for the operation, click the plus sign (+) next to Connector configuration to access the global element configuration fields.

  4. On the General tab, specify the connection information for the connector.

  5. Set Working Directory to ${workingDir}.
    This is the root of every relative path used with this connector. The value defaults to the remote server.

  6. Set Host to specify the SFTP server host, for example, localhost or 192.168.0.1.

  7. Set Port to ${sftpPort}.

  8. Set Username to anonymous and Password to password.

  9. On the Advanced tab, optionally specify the timeout configuration and reconnection strategy.

  10. Click Test Connection to confirm that Mule can connect with the specified server.

  11. Click OK.

FTP Connector Global Element Configuration

In the Configuration XML tab of your Studio canvas, the configuration ftp:config looks like this:

<ftp:config name="FTP_Config" doc:name="FTP Config" doc:id="" >
  <ftp:connection workingDir="${workingDir}" host="localhost"
    port="${ftpPort}" username="anonymous" password="password" />
</ftp:config>
View on GitHub