Upload File with FTP

Last Updated: 08/11/2016 Introduced in Verision: 2.0

File Transfer Protocol (FTP) is a secure method to transfer files across a network. Some FTP servers allow an anonymous connection, but many require that you enter the user name and password for the FTP server when connecting. Use a flow to upload a file to an FTP server, using the authentication information you specify.

To use a flow to upload a file, in the Flow Designer, in the Toolbox panel, expand the category Integration > FTP and drag an Upload component to the workspace.

Example

In the example, we will create a flow to upload a file via FTP. Pre-request FTP site.

To begin, navigate to a Designer folder and click the Create Flow button.

createFlow

 

Give the flow a name and click OK to open it in the Flow Designer.

nameFlow

 

In the Flow Designer start-up window, expand the category Integrations > All Integrations > FTP, and select an Upload component. Click Add to add it to the workspace.

flowStarts

This flow has only one step. Connect the Upload step to the End step.

 

 setFTPAccess
Next, set the values for FTP authentication and connection and select the file to upload.

In the Properties panel, in the FTP > Server > Authentication section, complete the Username and Password fields for the FTP account.

In the Host field,  enter the Host name of the FTP server. 

In the section Inputs > File,  select Constant from the Mapping Type drop-down list.

dragUploadFTP

 

 

To select the file to upload, we click the Value selector.

In the resulting pop-up, select a file to upload, and click Open.

selectFileToUpload

 

 

In the section Inputs > Upload to Path, enter a name for the uploaded file in the Value field. To access the file once it is uploaded, the user will look for the file with this name in the FTP directory on the FTP server.

uploadToPath

 

This completes the flow,  save the flow and run it in the Debugger.

On the Events tab, the file upload is shown as running. The file upload may take a few seconds or longer depending on network traffic and transfer speed.

Select the Diagram tab to view the flow’s execution. The flow is complete.

 

The file selected in the flow is uploaded successfully to the FTP server. 

Additional Resources