Skip to main content

system.kanoa.quality.config.sheets.addFile

This function requires KanoaQDS module

Description

Adds a file for a check sheet in KanoaQDS.

Syntax

addFile(chkShtId, fileName, fileBlob, description, thumbnail, userId)
  • Parameters
      chkShtId - ID of the check sheet (int).
      fileName - Name of the file (string).
      fileBlob - Blob containing file data.
      description - Description of the file (string).
      thumbnail - Blob containing thumbnail data.
      userId - User ID (int).
  • Returns
      # of records created - Number of records created (int).
  • Code Example

    # 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)