Uploads

class matterapi.endpoints.async_api.UploadsApi(client: matterapi.client.base.BaseClient, skip_response_parsing: bool = False)

Endpoints for creating and performing file uploads.

async create_upload(*, json_body: Union[matterapi.models.CreateUploadJsonBody, Dict]) matterapi.models.UploadSession

Create an upload

Creates a new upload session.

Permissions:

Must have upload_file permission.

Minimum Server Version:

5.28

Api Reference:

CreateUpload

async get_upload(upload_id: str) None

Get an upload session

Gets an upload session that has been previously created.

Permissions:

Must be logged in as the user who created the upload session.

Api Reference:

GetUpload

async upload_data(upload_id: str, *, form_data: matterapi.models.UploadDataFormData) Optional[matterapi.models.FileInfo]

Perform a file upload

Starts or resumes a file upload. To resume an existing (incomplete) upload, data should be sent starting from the offset specified in the upload session object.

The request body can be in one of two formats: - Binary file content streamed in request’s body - multipart/form-data

Permissions:

Must be logged in as the user who created the upload session.

Api Reference:

UploadData