Class

EntityImages

EntityImages(client, entityName, entityId)

Class corresponding to Aworks project related part of the Files Endpoints
Constructor

# new EntityImages(client, entityName, entityId)

Endpoint constructor
Parameters:
Name Type Description
client Client
entityName 'projects' | 'projecttemplates' | 'users' | 'workspaces' | 'companies'
entityId String
See:
  • [Files in Awork API Docs](https://openapi.awork.com/#/Files)

View Source endpoints/EntityImages.js, line 12

Classes

EntityImages

Methods

# async create(file, metadata) → {Promise.<EntityFile>}

Uploads a File or Buffer Object
Parameters:
Name Type Description
file File | Buffer The file content eather as ES6 File object or Buffer.
metadata FileMetaData The file metadata.

View Source endpoints/EntityImages.js, line 58

Promise.<EntityFile>

# async delete() → {Promise.<void>}

Deletes the profile image of the entity with the specified id.

View Source endpoints/EntityImages.js, line 77

Promise.<void>

# async download(fileId, optionsopt) → {String}

Parameters:
Name Type Attributes Description
fileId String The id of the file.
options DownloadOptions <optional>
The download options.

View Source endpoints/EntityImages.js, line 41

binary
String