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

# upload-to-dropbox

> Learn how the upload-to-dropbox task uploads artifacts to an application folder in Dropbox.

This task uploads the specified artifact to an application folder on the Dropbox server.

## Parameters

- `clientId`: The OAuth2 client ID of your Dropbox app.
- `clientSecret`: The OAuth2 client secret of your Dropbox app.
- `refreshToken`: The Refresh Token value for autonomous (offline) authorization.

For each artifact listed in `inputArtifacts`, a path for saving the file must be specified as follows:

`"<artifact_name>": "<remote_path>"`

If the path includes subfolders, the handler checks for the existence of these folders and attempts to create them if necessary. For example:

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

### Artifact collections

To upload a collection, list it in `inputArtifacts` with an asterisk, and use the `@` marker in the parameter value to build the path from the data of the current element:

- `{{result@:index}}`: The index of the artifact in the collection.
- `{{result@:name}}`: The name of the original asset.

For example:

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

To override the path for a single artifact from the collection, define a separate parameter for it. Without the `@` marker, the value refers to the artifact by its index:

```js
"result1": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/{{result1:name}}"
```

For a single artifact, use the `:name` specifier the same way: `{{design:name}}`.

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 Dropbox",
  "name": "upload-to-dropbox",
  "type": "upload-to-dropbox",
  "inputArtifacts": [
    "design",
    "result*"
  ],
  "parameters": {
    "clientId": "12345",
    "clientSecret": "12345",
    "refreshToken": "12345",
    "design": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/source-design-{{project.id}}",
    "result*": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/print-file-{{result@:index}}-{{project.id}}",
    "result1": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/{{result1:name}}"
  },
  "outputArtifacts": []
}
```
