# `Chatto.Api.V1.AssetUploadService`
[🔗](https://github.com/xtian/elixir-chatto/blob/v0.1.0/lib/chatto/generated/chatto_api_v1_asset_upload_service.ex#L3)

Creates room-scoped attachment assets through chunked ConnectRPC uploads.

# `cancel_upload`

```elixir
@spec cancel_upload(Req.Request.t(), Chatto.Api.V1.CancelUploadRequest.t()) ::
  {:ok, Chatto.Api.V1.CancelUploadResponse.t()}
  | {:error, Chatto.Connect.Error.t()}
```

Cancels an incomplete upload and releases temporary storage.

# `complete_upload`

```elixir
@spec complete_upload(Req.Request.t(), Chatto.Api.V1.CompleteUploadRequest.t()) ::
  {:ok, Chatto.Api.V1.CompleteUploadResponse.t()}
  | {:error, Chatto.Connect.Error.t()}
```

Verifies the completed upload and creates the attachment asset.

# `create_upload`

```elixir
@spec create_upload(Req.Request.t(), Chatto.Api.V1.CreateUploadRequest.t()) ::
  {:ok, Chatto.Api.V1.CreateUploadResponse.t()}
  | {:error, Chatto.Connect.Error.t()}
```

Starts a room-scoped attachment upload for the authenticated user.

# `get_upload`

```elixir
@spec get_upload(Req.Request.t(), Chatto.Api.V1.GetUploadRequest.t()) ::
  {:ok, Chatto.Api.V1.GetUploadResponse.t()}
  | {:error, Chatto.Connect.Error.t()}
```

Reads current upload state for retry or resume.

# `upload_chunk`

```elixir
@spec upload_chunk(Req.Request.t(), Chatto.Api.V1.UploadChunkRequest.t()) ::
  {:ok, Chatto.Api.V1.UploadChunkResponse.t()}
  | {:error, Chatto.Connect.Error.t()}
```

Appends one chunk at the upload's current committed offset.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
