Skip to content

upload

konigle.managers.core.upload

Upload managers for the Konigle SDK.

This module provides managers for Upload resources with specialized methods for handling file uploads without update capability.

AsyncUploadManager

Bases: BaseUploadManager, BaseAsyncManager

Async manager for upload resources.

create(data) async

Create a new upload.

create_cloud_upload(mime_type, file_size, filename, name=None) async

Create a presigned upload URL for direct to cloud upload.

PARAMETER DESCRIPTION
mime_type

MIME type of the file to upload

TYPE: str

file_size

Size of the file in bytes

TYPE: int

filename

Name of the file

TYPE: str

name

Display name for the upload (optional)

TYPE: Optional[str] DEFAULT: None

RETURNS DESCRIPTION
Dict[str, Any]

Upload info with presigned URL details

mark_completed(id_) async

Mark the upload as completed.

This is called for direct to cloud uploads once the upload is completed.

PARAMETER DESCRIPTION
id_

Upload ID

TYPE: str

RETURNS DESCRIPTION
Upload

Updated upload instance

mark_failed(id_) async

Mark the upload as failed.

This is called for direct to cloud uploads if the upload fails.

PARAMETER DESCRIPTION
id_

Upload ID

TYPE: str

RETURNS DESCRIPTION
Upload

Updated upload instance

mark_started(id_) async

Mark the upload as started.

This is called for direct to cloud uploads once the upload is started.

PARAMETER DESCRIPTION
id_

Upload ID

TYPE: str

RETURNS DESCRIPTION
Upload

Updated upload instance

update(id_, data) async

Update operation not supported for uploads.

BaseUploadManager

base_path = '/admin/api/uploads' class-attribute instance-attribute

The API base path for this resource type.

filter_class = None class-attribute instance-attribute

No filtering for uploads.

resource_class = Upload class-attribute instance-attribute

The resource model class this manager handles.

resource_update_class = None class-attribute instance-attribute

No update capability for uploads.

UploadManager

Bases: BaseUploadManager, BaseSyncManager

Manager for upload resources.

create(data)

Create a new upload.

create_cloud_upload(mime_type, file_size, filename, name=None)

Create a presigned upload URL for direct to cloud upload.

PARAMETER DESCRIPTION
mime_type

MIME type of the file to upload

TYPE: str

file_size

Size of the file in bytes

TYPE: int

filename

Name of the file

TYPE: str

name

Display name for the upload (optional)

TYPE: Optional[str] DEFAULT: None

RETURNS DESCRIPTION
Dict[str, Any]

Upload info with presigned URL details

mark_completed(id_)

Mark the upload as completed.

This is called for direct to cloud uploads once the upload is completed.

PARAMETER DESCRIPTION
id_

Upload ID

TYPE: str

RETURNS DESCRIPTION
Upload

Updated upload instance

mark_failed(id_)

Mark the upload as failed.

This is called for direct to cloud uploads if the upload fails.

PARAMETER DESCRIPTION
id_

Upload ID

TYPE: str

RETURNS DESCRIPTION
Upload

Updated upload instance

mark_started(id_)

Mark the upload as started.

This is called for direct to cloud uploads once the upload is started.

PARAMETER DESCRIPTION
id_

Upload ID

TYPE: str

RETURNS DESCRIPTION
Upload

Updated upload instance

update(id_, data)

Update operation not supported for uploads.