File Field Api

An api for file management. These functions are available under the `convenienceApi.fileField` namespace.

Methods

downloadFile(workspaceId, artifactId, fieldId, fileName)undefined
Downloads file from specified field.
uploadFile(workspaceId, artifactId, fieldId, file, backendProgressCallback, frontendProgressCallback, cancellationToken)Promise
Uploads file to specified field.

Properties Details

downloadFile(workspaceId, artifactId, fieldId, fileName) ⇒ undefined

Downloads file from specified field.

Param Type Description
workspaceId Number Workspace ID.
artifactId Number Artifact ID.
fieldId Number Field ID.
fileName String File name.

uploadFile(workspaceId, artifactId, fieldId, file, backendProgressCallback, frontendProgressCallback, cancellationToken) ⇒ Promise

Uploads file to specified field.

Returns: Promise - File upload promise.

Param Type Description
workspaceId Number Workspace ID.
artifactId Number Artifact ID.
fieldId Number File Field ID.
file Object File object from file input.
backendProgressCallback function Function called when file upload API reports progress.
frontendProgressCallback function Function called when browser reports progress.
cancellationToken Object Token granting access to stop upload in progress.