# `Jido.Chat.FileUpload`
[🔗](https://github.com/agentjido/jido_chat/blob/v1.0.0/lib/jido/chat/file_upload.ex#L1)

Canonical outbound file upload request used by posting and upload helpers.

# `input`

```elixir
@type input() :: t() | Jido.Chat.Attachment.input()
```

# `t`

```elixir
@type t() :: %Jido.Chat.FileUpload{
  data: nil | nil | binary(),
  duration: nil | nil | integer(),
  filename: nil | nil | binary(),
  height: nil | nil | integer(),
  kind: :image | :audio | :video | :file,
  media_type: nil | nil | binary(),
  metadata: map(),
  path: nil | nil | binary(),
  size_bytes: nil | nil | integer(),
  url: nil | nil | binary(),
  width: nil | nil | integer()
}
```

# `from_map`

```elixir
@spec from_map(map()) :: t()
```

Builds a file upload from serialized map data.

# `new`

Creates a file upload request from normalized map input.

# `normalize`

```elixir
@spec normalize(input()) :: t()
```

Normalizes supported upload inputs into a canonical file upload struct.

# `normalize_many`

```elixir
@spec normalize_many([input()]) :: [t()]
```

Normalizes a list of file upload inputs.

# `schema`

Returns the Zoi schema for FileUpload.

# `to_map`

```elixir
@spec to_map(t()) :: map()
```

Serializes a file upload into a plain map with type marker.

---

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