corporateacademy-upload

Methods

(static) deleteUploadFile(uploadId, skipBlobCancellation, token) → {boolean}

Deletes an upload. By default, the related file will be deleted from the azure blob too.

Parameters:
Name Type Description
uploadId string

Required: Id of the upload to delete

skipBlobCancellation boolean

Optional: If true, the blob won't be deleted

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/delete-upload-file
Returns:

True if no errors were thrown, false otherwise

Type
boolean

(static) getAllUploadByReference(referenceId, referenceType, token) → {Upload}

Function that return a list of uploads by reference

Parameters:
Name Type Description
referenceId string | Array.<string>

ReferenceIds to filter

referenceType string

Reference type to filter

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP GET /rest-api/corporateacademy-mediator/get-all-upload-by-reference
Returns:

Retrieved file's information with URL

Type
Upload

(static) getSambaliveRecordingUploadsByIds(uploadIds, token) → {Upload}

Retrieve all upload of sambalive recordings

Parameters:
Name Type Description
uploadIds string | Array.<string>

Required: Ids of the upload to retrieve

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP GET /rest-api/corporateacademy-mediator/get-sambaLive-recording-uploads-by-ids
Returns:

The retrieved Upload object

Type
Upload

(static) getUploadById(uploadId, token) → {Upload}

Retrieve an upload using its id

Parameters:
Name Type Description
uploadId string

Required: Id of the upload to retrieve

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP GET /rest-api/corporateacademy-mediator/get-upload-by-id
Returns:

The retrieved Upload object

Type
Upload

(static) getUploadByIdForPublic(userId, uploadId) → {Upload}

Retrieve an upload using its id NB: This is a public method, so anyone can use it

Parameters:
Name Type Description
userId string

Required: Id of the user who's requesting the record

uploadId string

Required: Id of the upload to retrieve

Listens to Events:
  • event:HTTP GET /rest-api/corporateacademy-mediator/get-upload-by-id-for-public
Returns:

The retrieved Upload object

Type
Upload

(static) uploadAnyFile(form, token) → {Upload}

Retrieve file data and send it to core for upload

Parameters:
Name Type Description
form Form

form data with file data

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/upload-any-file
Returns:

Retrieved file's information with URL

Type
Upload

(static) uploadAvatar(form, token) → {Upload}

Retrieve file data and send it to core for upload

Parameters:
Name Type Description
form Form

form data with file data

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/upload-avatar
Returns:

Retrieved file's information with URL

Type
Upload

(static) uploadTemplateFile(form) → {any}

Retrieve file data and send it to core for upload

Parameters:
Name Type Description
form Form

form data with file data

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/upload-template-file
Returns:

Proxyed url of the uploaded content as value of link object

Type
any