UploadOperation

UploadOperation

UploadOperation contains information describing a number of files to be uploaded and where they should be sent.

Constructor

new UploadOperation(storageServiceId, sourceFiles)

Creates a new UploadOperation.

Parameters:
Name Type Description
storageServiceId string

The id of the StorageService to which we'll be sending files.

sourceFiles string

A list of files to upload. Each entry in this list should be an absolute path.

Source:

Members

errors :Object.<string, string>

Contains information describing validation errors. Key is the name of the invalid field. Value is a description of why the field is not valid.

Source:

payloadSize :OperationResult

The total size, in bytes, of the files to be uploaded.

Source:

results :OperationResult

This describes the result of DART's attempt to upload the files.

Source:

sourceFiles :Array.<string>

A list of files to upload. Each entry in this list should be an absolute path.

Source:

storageServiceId :string

The ID (UUID) of the StorageService to which we want to send files.

Source:

Methods

(static) inflateFrom(data) → {UploadOperation}

This converts the JSON representation of an UploadOperation to a full-fledged UploadOperation object with all of the expected methods.

Parameters:
Name Type Description
data Object

A JavaScript hash.

Source:

validate() → {boolean}

validate returns true or false, indicating whether this object contains complete and valid data. If it returns false, check the errors property for specific errors.

Source: