# `Omni.Content.Attachment`
[🔗](https://github.com/aaronrussell/omni/blob/v1.2.1/lib/omni/content/attachment.ex#L1)

An attachment content block for binary content such as images, PDFs, and
other media.

Sources use tagged tuples: `{:base64, data}` for inline binary data, or
`{:url, url}` for remotely-hosted content.

The `:meta` field is an application-layer map for data that Omni's dialects
do not read or send to providers — for example, filenames or display labels
in a UI.

# `source`

```elixir
@type source() :: {:base64, binary()} | {:url, String.t()}
```

An attachment source — inline base64 data or a remote URL.

# `t`

```elixir
@type t() :: %Omni.Content.Attachment{
  media_type: String.t(),
  meta: map(),
  source: source()
}
```

Binary content with a source, media type, and optional application metadata.

# `new`

```elixir
@spec new(Enumerable.t()) :: t()
```

Creates a new attachment content block from a keyword list or map.

---

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