---
title: "upload-to-ftp | Customer&#x27;s Canvas Hub"
canonical: "https://customerscanvas.com/docs/hub/printer-guide/pipelines/tasks/upload-to-ftp/"
---

# upload-to-ftp

> Learn how the upload-to-ftp task uploads artifacts to an FTP or SFTP server.

This task uploads the specified artifact to FTP/SFTP.

## Parameters

- `protocol` - Specifies the protocol, either `ftp` or `sftp`.
- `host` - Host address.
- `port` - Port for access; can be omitted (defaults: FTP - 21, SFTP - 22).
- `username` - Username for server access.
- `password` - Password for server access.
- `usePassive` - Setting for FTP protocol: passive mode.
- `useBinary` - Setting for FTP protocol: binary data transfer mode.
- `enableSsl` - Setting for FTP protocol: encryption mode.

For each artifact listed in `inputArtifacts`, a path for the file must be specified as follows: `"<artifact_name>": "<remote_path>"`. If the path includes subfolders, the handler checks for the existence of those folders and attempts to create them if necessary. For example:

```js
"design": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/source-design-{{project.id}}"
```

Processing of artifact groups is supported. The symbol `*` indicates the insertion point for the artifact index in the file path, for example:

```js
"result*": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/print-file-*-{{project.id}}"
```

Overriding the path for a specified artifact in the group is also supported, for example:

```js
"result1": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/override-name-for-the-first-result"
```

These parameters support [argument interpolation](https://customerscanvas.com/docs/hub/printer-guide/pipelines/concepts/interpolation.md) following the common rules. 

## Example

``` json
{
    "description": "Upload to FTP",
    "name": "upload-to-ftp",
    "type": "upload-to-ftp",
    "inputArtifacts": [
        "design",
        "result*"
    ],
    "parameters": {
        "protocol": "ftp",
        "host": "ftp.example.com",
        "port": 21,
        "username": "user1",
        "password": "12345",
        "usePassive": true,
        "useBinary": true,
        "enableSsl": true,
        "design" : "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/source-design-{{project.id}}",
        "result*" : "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/print-file-*-{{project.id}}",
        "result1" : "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/override-name-for-the-first-result"
    },
    "outputArtifacts": []
}
```
