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*booleanstring

Enable the RSA/SHA1 algorithm (disabled by default)

from*string

Directory URI to list

host*string

Remote host

assets

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
maxFilesintegerstring

Maximum files to retrieve

passwordstring

Password

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

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
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

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