Class

FileVersions

FileVersions()

Class corresponding to Versions part of the Aworks EntityFiles Endpoints
Constructor

# new FileVersions()

See:
  • [EntityFiles in Awork API Docs](https://openapi.awork.com/#/EntityFiles)

View Source endpoints/FileVersions.js, line 13

Classes

FileVersions

Methods

# async create(file, metadata)

Uploads a new version of an entity file. Use this to upload a file as a form value along with the basic file meta data. The file size must not exceed 1GB.
Parameters:
Name Type Description
file File | Buffer
metadata FileMetaData

View Source endpoints/FileVersions.js, line 61

# async download(versionId) → {Promise.<Object>}

Returns the content of the entity file version with the specified id.
Parameters:
Name Type Description
versionId String

View Source endpoints/FileVersions.js, line 81

Promise.<Object>

# async get(versionId) → {Promise.<FileVersion>}

Returns the entity file version with the specified id
Parameters:
Name Type Description
versionId String

View Source endpoints/FileVersions.js, line 31

Promise.<FileVersion>

# async list(fileId, optionsopt) → {Array.<FileVersion>}

Returns all file versions of the specified entity file.
Parameters:
Name Type Attributes Description
fileId String
options ListOptions <optional>
Pagination and filtering options

View Source endpoints/FileVersions.js, line 43

Array.<FileVersion>