Files
Files are binary attachments (images, PDFs, audio) that can be associated with Tests and TestResults. They are managed through a dedicated upload API rather than the standard push() method.
File
A File represents a binary attachment stored on the platform.
Properties
| Property | Type | Description |
|---|---|---|
id | str | Unique identifier (assigned on upload) |
filename | str | Original file name |
content_type | str | MIME type (e.g., image/png) |
size_bytes | int | File size in bytes |
description | str | Optional description |
entity_id | str | ID of the parent entity |
entity_type | str | Parent type (Test or TestResult) |
position | int | Ordering position within the entity |
Limits
- Max file size: 10 MB per file
- Max total per entity: 20 MB
- Max files per request: 10
- Allowed types: images, PDFs, audio files
Uploading Files
Via Test Entity
The simplest way to attach files is through the Test entity:
Via File.add()
Use File.add() directly for more control:
Base64 Upload
For programmatic uploads without local files:
Downloading Files
Download file content to a local directory:
Managing Files
Listing Files
Deleting Files
Note - File.push() is not supported. Use File.add() or test.add_files() to upload files.