Upload File with FTP
- Updated on 09 May 2013
- 1 minute to read
File Transfer Protocol (FTP) is a secure method for transfering 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. We can 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 go into the Flow Designer. In the Steps panel, expand the category Integration > FTP and add an Upload component to the workspace.
In this example, we will create a flow to upload a file via FTP. The only prerequest for this example is an FTP site.
To begin, navigate to a Designer folder and click theCreate Flow button.
Give the flow a name and click OK to open it in theFlow Designer .
In the Flow Designer's Quick Add window, expand the category Integrations > All Integrations > FTP , and select an Upload component. Click Add to add it to the workspace.
This flow has only one step. Connect the Upload step to the End step.
Set the values for FTP authentication and connection, and select a file you would like 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.
To select the file to upload, we can either Drag a File into this space or select Choose File . For this example select Choose File . Select a file to upload, and click Open.
In the sectionInputs > 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 in the FTP directory on the FTP server.
This completes the flow. Save it and run it in the Debugger.
The file upload may take longer than expected depending on network traffic and transfer speed. The flow is complete. The file selected in the flow is uploaded successfully to the FTP server.