Skip to main content

upload-to-dropbox

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

Parameters​

  • clientId: The Client ID value in OAuth2 Credentials in Google Cloud.
  • clientSecret: The Client Secret value in OAuth2 Credentials in Google Cloud.
  • 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:

"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:

"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:

"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 following the common rules.

Example​

{
"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": []
}
Was this page helpful?