elasticio / sftp-component

SFTP component for the elastic.io platform
Apache License 2.0
2 stars 3 forks source link
eio-component sftp

SFTP Component

CircleCI CLA assistant

Table of Contents

Description

This component creates a connection to an SFTP server to read and upload files.

Environment variables

Name Mandatory Description Values
MAX_FILE_SIZE false Maximum file size that can be uploaded in megabytes (mb) (100MB by default) any integer above 0

Credentials

Triggers

Poll Files

Triggers to get all new and updated files since last polling.

Configuration Fields

Output Metadata

Known limitations

Deprecated Triggers

Read Files ### Read Files Will continuously poll remote SFTP location for files that match given pattern. Found files will be transferred as attachments to the next component After a file is found: * It is moved to the (hidden) directory `.elasticio_processed` and to name of the file will be added timestamp, ex.: file `test.txt` will be renamed to `test.txt_1657621889133` * It is pulled and uploaded (streamed) to the attachment storage Note: you may need to consider cleaning up the `.elasticio_processed` directory manually #### Configuration Fields * **Directory** - (string, required): The directory of the files to read from * **Pattern** - (string, optional): Regex pattern for file names. If no pattern is given, no matching is done. #### Input Metadata none #### Output Metadata * **filename** - (string, required): Name of the file * **size** - (number, required): File size

Actions

Delete File

Action to delete file by provided full file path.If the file does not exist, the empty message ({}) is returned

Configuration Fields

none

Input Metadata

Output Metadata

Download File by name

Finds a file by name in the provided directory and either uploads (streams) its content to the attachment storage or emits its in Base64 representation as a message.

Configuration Fields

Input Metadata

Output Metadata

Download Files

Finds files by criteria in the provided directory and either uploads (streams) their content to the attachment storage or emits it in Base64 representation as a message.

Configuration Fields

Input Metadata

Output Metadata

Configuration Fields

none

Input Metadata

Output Metadata

Upload File From URL

Given a filename and a URL to an attachment, transfers the contents of the attachment to the SFTP server

Configuration Fields

Note: If the filename provided contains directories that do not exist, those directories will be created.

Input Metadata

Output Metadata

Upload Files From Attachments Header

Configuration Fields

Input Metadata

Output Metadata

An object, with key results that has an array as its value