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

Normalized outbound attachment used by post payloads and sent-message handles.

# `input`

```elixir
@type input() ::
  t()
  | Jido.Chat.FileUpload.t()
  | Jido.Chat.Media.t()
  | Jido.Chat.Content.Image.t()
  | Jido.Chat.Content.Audio.t()
  | Jido.Chat.Content.Video.t()
  | Jido.Chat.Content.File.t()
  | map()
  | String.t()
```

# `t`

```elixir
@type t() :: %Jido.Chat.Attachment{
  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()
}
```

# `new`

Creates an attachment struct from normalized map input.

# `normalize`

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

Normalizes supported outbound attachment inputs into a canonical attachment struct.

# `normalize_many`

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

Normalizes a list of attachment inputs.

# `schema`

Returns the Zoi schema for Attachment.

---

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