# `Buble.Files`
[🔗](https://github.com/bublehq/sdks/blob/main/lib/buble/files.ex#L1)

Source media upload methods.

Upload a file, then pass the returned URL into generation requests as
`image_urls`, `video_urls`, `audio_urls`, `start_frame`, or `end_frame`.

# `file_source`

```elixir
@type file_source() ::
  String.t()
  | {:path, String.t()}
  | {:binary, binary(), keyword()}
  | %{
      :content =&gt; binary(),
      optional(:filename) =&gt; String.t(),
      optional(:content_type) =&gt; String.t()
    }
```

# `upload`

```elixir
@spec upload(Buble.Client.t(), file_source(), keyword() | map()) ::
  {:ok, map()} | {:error, Buble.Error.t()}
```

# `upload!`

```elixir
@spec upload!(Buble.Client.t(), file_source(), keyword() | map()) :: map()
```

---

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