Constructor
# new FileVersions()
- See:
-
- [EntityFiles in Awork API Docs](https://openapi.awork.com/#/EntityFiles)
Classes
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
|
# async download(versionId) → {Promise.<Object>}
Returns the content of the entity file version with the specified id.
Parameters:
Name | Type | Description |
---|---|---|
versionId |
String
|
Promise.<Object>
# async get(versionId) → {Promise.<FileVersion>}
Returns the entity file version with the specified id
Parameters:
Name | Type | Description |
---|---|---|
versionId |
String
|
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 |
Array.<FileVersion>