UploadFiles UploadFiles

yaml
type: "io.kestra.plugin.core.namespace.UploadFiles"

Upload one or multiple files to a specific namespace.

Use a regex glob pattern or a file path to upload files as Namespace Files. When using a map with the desired file name as key and file path as value, you can also rename or relocate files.

Examples

Upload a custom Python script to the dev namespace and execute it

yaml
id: upload_inputfile
namespace: dev

inputs:
  - id: my_python_script
    type: FILE

tasks:
  - id: upload_and_rename
    type: io.kestra.plugin.core.namespace.UploadFiles
    files:
      /scripts/main.py: "{{ inputs.my_python_script }}"
    namespace: dev

  - id: python
    type: io.kestra.plugin.scripts.python.Commands
    namespaceFiles:
      enabled: true
    commands:
      - python scripts/main.py

Properties

conflict

  • Type: string
  • Dynamic:
  • Required:
  • Possible Values:
    • OVERWRITE
    • ERROR
    • SKIP

Which action to take when uploading a file that already exists.

Can be one of the following OVERWRITE, ERROR or SKIP.

destination

  • Type: string
  • Dynamic: ✔️
  • Required:

The destination folder.

Required when providing a list of files.

files

  • Type:
    • array
    • object
  • Dynamic: ✔️
  • Required:

A list of files.

This can be a list of strings, where each string can be either a regex glob pattern or a file path. Providing a list requires specifying a destination where files will be stored. This can also be a map where you can provide a specific destination path for a URI, which can be useful if you need to rename a file or move it to a different folder.

namespace

  • Type: string
  • Dynamic: ✔️
  • Required:

The namespace to which the files will be uploaded.

Outputs

files

  • Type: object
  • SubType: string
  • Dynamic:
  • Required:

Definitions

Was this page helpful?