File system Uploads

File system Uploads

Certified

Upload multiple files via SFTP

Uploads each provided file to the target directory. Defaults: port 22, user home as root, password auth unless a PEM key is provided, host key checking disabled by default.

yaml
type: io.kestra.plugin.fs.sftp.Uploads

Upload files using a list of URIs

yaml
id: fs_sftp_uploads
namespace: company.team

inputs:
  - id: file1
    type: FILE
  - id: file2
    type: FILE

tasks:
  - id: uploads
    type: io.kestra.plugin.fs.sftp.Uploads
    host: localhost
    port: "22"
    username: foo
    password: "{{ secret('SFTP_PASSWORD') }}"
    from:
      - "{{ inputs.file1 }}"
      - "{{ inputs.file2 }}"
    to: "/upload/dir2"

Upload only files matching a regex (e.g. .sql files)

yaml
id: fs_sftp_uploads_regexp
namespace: company.team

tasks:
  - id: uploads
    type: io.kestra.plugin.fs.sftp.Uploads
    host: sftp.example.com
    port: "22"
    username: foo
    password: "{{ secret('SFTP_PASSWORD') }}"
    from:
      - "{{ outputs.step1.uri }}"
      - "{{ outputs.step2.uri }}"
    regExp: ".*\\.sql$"
    to: "/remote/path"

Upload files with custom destination filenames using a map

yaml
id: fs_sftp_uploads_with_names
namespace: company.team

inputs:
  - id: file1
    type: FILE
  - id: file2
    type: FILE

tasks:
  - id: uploads
    type: io.kestra.plugin.fs.sftp.Uploads
    host: localhost
    port: "22"
    username: foo
    password: "{{ secret('SFTP_PASSWORD') }}"
    from:
      report.csv: "{{ inputs.file1 }}"
      data.json: "{{ inputs.file2 }}"
    to: "/upload/dir2"
Properties

Files to upload (kestra:// URIs)

Kestra internal storage URIs; accepts a single URI string, a list of URIs, a map of destination filenames to URIs (to preserve original filenames), or a URI pointing to a file that contains URIs.

Definitions
enableSshRsa1*Requiredbooleanstring

Enable the RSA/SHA1 algorithm (disabled by default)

from*Requiredstring

Directory URI to list

host*Requiredstring

Remote host

maxFilesintegerstring

Maximum files to retrieve

passwordstring

Password

pluginDefaultsRefstring

Reference (ref) of the pluginDefaults to apply to this task.

recursivebooleanstring

List files recursively

regExpstring

Regexp filter on full path

sortstring
Possible Values
NONELAST_MODIFIED_ASCLAST_MODIFIED_DESCNAME_ASCNAME_DESC

Sort order applied to the list before maxFiles truncation

NONE (default) preserves the order in which the server returns files. LAST_MODIFIED_ASC/LAST_MODIFIED_DESC sort by last modified date, oldest/newest first. NAME_ASC/NAME_DESC sort alphabetically by file name.

typeobject
usernamestring

Username

Remote host

Destination directory

Defaultfalse

Enable the RSA/SHA1 algorithm (disabled by default)

Key exchange algorithm

Override the KEX algorithm (e.g. diffie-hellman-group14-sha1, diffie-hellman-group-exchange-sha256).

SSH private key (PEM)

PEM-formatted private key for public key auth. Convert OpenSSH keys with ssh-keygen -m PEM.

Default25

Maximum files to upload

Defaulttrue

Overwrite existing files

If false, fails when the destination already exists.

Passphrase for the SSH key

Password

Reference (ref) of the pluginDefaults to apply to this task.

Default22

Remote port

SFTP proxy address

SFTP proxy password

SFTP proxy port

SFTP proxy type

One of SOCKS5, STREAM, or HTTP.

SFTP proxy username

Regexp filter on full path

Only source URIs fully matching this regex are uploaded. Example: .*\.sql$.

Defaulttrue

Treat path as user home root

If true (default), remote paths are resolved relative to the authenticated user's home directory.

Username

SubTypestring

The fully-qualified URIs that point to the uploaded files on remote