Api.uploadImage

uploadImage(containerId, documentId, imageType, filename, imageData)

Creates a new image for a document and uploads binary image data to the TrustID Cloud. Binary image data must be provided as an ArrayBuffer object.

This method executes asynchronously and returns a promise.

Arguments
  • containerId (guid()) – Unique identifier of the document container that contains the document.

  • documentId (guid()) – Unique document identifier of the document.

  • imageType (int()) – The type of image to upload. See Image Types for information on image types.

  • filename (string()) – Optional: The original name of the file that is uploaded. If no filename is known, use null.

  • imageData (ArrayBuffer()) – An array buffer containing the binary data of the image to be uploaded, typically in JPEG format.

Returns

For error responses, see Error Responses.

If successful, creates a new image for the document and uploads binary image data to the TrustID Cloud.