npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-ftp-client

v0.1.11

Published

FTP client node for Node-RED.

Downloads

111

Readme

node-red-contrib-ftp-client

FTP client node for Node-RED.

NPM

Table of Contents

Overview

The node-red-contrib-ftp-client package is a Node-RED node that allows you to interact with FTP servers. With this package, you can perform various operations like listing files, getting files, putting files, appending to files, deleting files, and creating directories on a remote FTP server.

Installation

To use this package, you need to have Node-RED installed. If you haven't already, you can install it from Node-RED's website.

Once Node-RED is installed, you can install node-red-contrib-ftp-client using npm:

npm install node-red-contrib-ftp-client

After installation, restart your Node-RED instance, and the FTP nodes will be available in the Node-RED palette for use.

Usage

node-red-contrib-ftp-client includes the following modules:

FTP Node

The FTP node provides the following operations:

  • LIST: List files and folders on a remote FTP server.
  • GET: Download a file from the remote server.
  • PUT: Upload a file to the remote server.
  • APPEND: Append data to an existing file on the remote server.
  • DELETE: Delete a file on the remote server.
  • MKDIR: Create a directory on the remote server.

Inputs

  • msg.operation (string):
    • Type of the operation. Allows 'LIST', 'GET', 'PUT', 'APPEND', 'DELETE' and 'MKDIR'. Default: 'LIST'
  • msg.host (string):
    • The hostname or IP address of the FTP server. Default: 'localhost'
  • msg.port integer:
    • The port of the FTP server. Default: 21
  • msg.secure (mixed):
    • Set to true for both control and data connection encryption, 'control' for control connection encryption only, or 'implicit' for implicitly encrypted control connection (this mode is deprecated in modern times, but usually uses port 990) Default: false
  • msg.secureOptions (object):
    • Additional options to be passed to tls.connect(). Default: (none)
  • msg.user (string):
    • Username for authentication. Default: 'anonymous'
  • msg.password (string):
    • Password for authentication. Default: 'anonymous@'
  • msg.connTimeout (integer):
    • How long (in milliseconds) to wait for the control connection to be established. Default: 10000
  • sg.pasvTimeout (integer):
    • How long (in milliseconds) to wait for a PASV data connection to be established. Default: 10000
  • msg.keepalive (integer):
    • How often (in milliseconds) to send a 'dummy' (NOOP) command to keep the connection alive. Default: 10000
  • msg.filename (string):
    • Path/name of the file on the remote FTP server.
  • msg.localFilename (string) | (buffer):
    • Path/name of the file on the local machine. Default the same as filename

Outputs

  1. Standard output (LIST):

    • msg.payload (array):
      • Array of the file/folders in the user's default FTP folder
  2. Standard output (GET, PUT, APPEND, DELETE and MKDIR):

    • msg.payload (string):
      • Message that processing is complete.
  3. Standard error:

    • msg.payload (string): Error message.
      • You can configure these operations using input messages and set options such as the filename, local filename, and more.

Example

Here's an example flow demonstrating how to use the FTP node to delete a file from a remote FTP server:

[{"id":"ea12685a5ea07fc8","type":"debug","z":"9c66d804bff1630b","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":360,"y":100,"wires":[]},{"id":"0f119f317f8339c0","type":"inject","z":"9c66d804bff1630b","name":"","props":[{"p":"host","v":"localhost","vt":"str"},{"p":"port","v":"21","vt":"str"},{"p":"user","v":"luzik","vt":"str"},{"p":"password","v":"111","vt":"str"},{"p":"operation","v":"DELETE","vt":"str"},{"p":"filename","v":"DiscordSetup.exe","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":100,"y":100,"wires":[["c15ef24c2beb93de"]]},{"id":"c15ef24c2beb93de","type":"ftp","z":"9c66d804bff1630b","name":"","x":230,"y":100,"wires":[["ea12685a5ea07fc8"]]}]