attachments
Bases: BaseAttachments
Source code in airia/client/attachments/sync_attachments.py
upload_file(file_path, correlation_id=None)
Upload a file and get attachment information.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
str
|
Path to the file on disk |
required |
correlation_id
|
Optional[str]
|
Optional correlation ID for request tracing. If not provided, one will be generated automatically. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
AttachmentResponse |
AttachmentResponse
|
Response containing the attachment ID and URL. |
Raises:
| Type | Description |
|---|---|
AiriaAPIError
|
If the API request fails with details about the error. |
RequestException
|
For other request-related errors. |