Skip to main content

system.kanoa.quality.config.sheets.addFile

Requires kanoaQDS license

Description

Adds a file for a check sheet.

Syntax

addFile(chkShtId, fileName, fileBlob, description, thumbnail, userId)

Parameters:
  • chkShtId (int): ID of the check sheet.
  • fileName (string): Name of the file.
  • fileBlob (blob): Blob containing file data.
  • description (string): Description of the file.
  • thumbnail (blob): Blob containing thumbnail data.
  • userId (int): User ID.

  • Returns:
  • recordsCreated (int): Number of records created.
  • Code Examples

    # Usage example
    chk_sht_id = 56
    file_name = "example_file.txt"
    file_blob = b'This is the file content.'
    description = "Example file description."
    thumbnail = b'Thumbnail content.'
    user_id = 123
    records_created = system.kanoa.quality.config.sheets.addFile(chkShtId=chk_sht_id, fileName=file_name, fileBlob=file_blob, description=description, thumbnail=thumbnail, userId=user_id)

    print(records_created)