Class

Files

Files(client)

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

# new Files(client)

Endpoint constructor
Parameters:
Name Type Description
client Client
See:
  • [Files in Awork API Docs](https://openapi.awork.com/#/Files)

View Source endpoints/Files.js, line 8

Classes

Files

Methods

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

Returns the content of the latest file version. If the file is an image and the width and height are set, the image will resized before it is returned. The get the content it is necessary to have the 'read' permissions on the entity the file is related to.
Parameters:
Name Type Attributes Description
fileId String The id of the file.
options FileDownloadOptions <optional>
The download options.

View Source endpoints/Files.js, line 33

binary
String

# async pdf(fileId, inlineopt) → {String}

Returns the content of the latest file version as pdf. The get the content it is necessary to have the 'read' permissions on the entity the file is related to.
Parameters:
Name Type Attributes Default Description
fileId String The id of the file.
inline Boolean <optional>
false Default: false. If inline is false, content-disposition header is attachment.

View Source endpoints/Files.js, line 44

binary
String