# `ExOss.CDN`
[🔗](https://github.com/choice-form/ex_oss/blob/main/lib/ex_oss/cdn.ex#L1)

CDN dispatcher that routes to the appropriate CDN adapter module
based on the client's `cdn.module` configuration.

This module is the single entry point for all CDN operations. It
delegates to the module stored in `ExOss.Client.CDN.module`, which is
resolved at client construction time from the `:provider` atom.

## Supported CDN Providers

  * `:cloudfront` — AWS CloudFront (see `ExOss.CDN.CloudFront`)
  * `:qiniu` — Qiniu CDN (see `ExOss.CDN.Qiniu`)

## Adding a New CDN Provider

1. Create a module implementing `ExOss.CDN.Behaviour`
2. In `ExOss.Client`, add a mapping from your provider atom to the module
3. In `ExOss.Client.CDN`, add the provider atom to the validation list

# `authorize_download_url`

```elixir
@spec authorize_download_url(
  ExOss.Client.Client.t(),
  binary(),
  binary(),
  non_neg_integer(),
  keyword()
) ::
  binary()
```

# `upload_credential`

```elixir
@spec upload_credential(
  ExOss.Client.Client.t(),
  binary(),
  binary(),
  non_neg_integer()
) ::
  ExOss.UploadCredential.t()
```

---

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