# FTP
# Overview
FTP node will enable connection to any FTP server.
# Setup
# Prerequisites
For FTP node to work properly, you need to have an FTP server with necessary connection details and credentials for connecting with the instance.
# Installation
To install the node from designer:
- Go to Add more nodes option on the palette section.
- Check for the FTP node and click install.
- Once installed, the designer is required to be restarted.
To install the node from CLI:
- Go to your project workspace where you can see your
package.json
file. - Run the below give npm command.
npm i @kumologica/kumologica-contrib-ftp
# Technical Details
Properties
- Hostname (Required)
Hostname associated with the FTP server. - Port (Optional)
Port that will be used by the FTP server. Default port is 21. - Username (Optional)
Username for basic authentication with the FTP server. If no used will beanonymous
. - Password (Optional)
Password for basic authentication with the FTP server. If no used will beanonymous@
. - Transfer mode (Optional)
FTP node supportASCII
andBinary
transfer mode. Default is Binary. - Location (Optional)
Destination folder to deliver or retrieve the file. - Content (Optional)
Content of the file. The payload should be a string or a buffer content. This is supported for Put and Append operation.
Note
The FTP node currently doesn't support the TLS feature. 512 mb is the minimum memory requirement for your AWS lambda deployment when using FTP node.
Supported Operations
- Put
Put operation helps in placing a new file on a given folder on the FTP server. - Get
Get operation helps in retrieving a file from a given folder on the FTP server. - List
List operation helps in retrieving the files and subdirectory details under a given folder path. - Append
Put operation helps in appending the content of an existing file on the FTP server. - Delete
Delete operation helps in deleting the file from a given folder on the FTP server. - Status
Status operation returns file or folder metadata if the FTP connection is success.
Throws
FTP node throws the following exception.
- FTPBadRequestError
- FTPDeleteError
- FTPGetError
- FTPPutError
- FTPAppendError
- FTPAppendError
- FTPAuthenticationError
- FTPStreamError
- FTPListError
- FTPConnectionError
Returns
Payload is overwritten by the response from this node for Get,List and Status operations. For Put
and Append
node the payload will not be overwritten. The returned response can be accessed using msg.payload
.
# Develop a Service
Video tutorial
# Instructions
Drag a drop an EventListener node from the palette to the canvas. Open the settings, configure the following and Save.
Display Name : POST /encoding Event Source : Amazon API gateway Verb : POST URL : /encoding
From the security category add Base64 node to the canvas. Open the settings, configure the following and Save.
Operation : Decode Property : msg.payload.testdata
Wire the EventListener node to the Base64 node.
Add a Logger node to the flow and set the Message as
msg.payload.testdata
to print the encoded value. Click Save.Add EventListener End node from the palette to the canvas. Open the settings, configure the following and Save.
Payload : msg.payload.testdata
# Try it
← Forms GoogleDrive →