UploadFile V2

upload_file_v2(public_api_client, file_path, artifact_type)

Description

High level wrapper function to upload artifact by presigned urls. It checks to upload file in chunks or not based on the size. If file_size ≤ chunk_size, will automatically use single upload, else use chunked upload. Minimal size of chunk_size is 5 MB (5242880 bytes).

Arguments

  • public_api_client: QDC api client object.
  • file_path: Local path of the artifact to be uploaded.
  • artifact_type: Type of the artifact (TESTPACKAGE, TESTSCRIPT).

Returns

  • uuid: uuid of the uploaded artifact.
  • None: In case of any failure.

Usages

  • qdc_api is the name of the module
apk_file_to_upload = "C:\\Temp\\test.apk"
apk_uuid = qdc_api.upload_file_v2(public_api_client, apk_file_to_upload, ArtifactType.TESTPACKAGE)