# `LangChain.FileUploader.FileResult`
[🔗](https://github.com/brainlid/langchain/blob/v0.8.4/lib/file_uploaders/file_result.ex#L1)

Represents the result of a file upload to an LLM provider.

Different providers return different types of file references:

- **OpenAI** and **Anthropic** return a `file_id` string
- **Google Gemini** returns a `file_uri` URL

At least one of `file_id` or `file_uri` will always be present.

The `raw` field contains the full provider response for accessing
provider-specific fields not covered by the struct.

# `t`
[🔗](https://github.com/brainlid/langchain/blob/v0.8.4/lib/file_uploaders/file_result.ex#L31)

```elixir
@type t() :: %LangChain.FileUploader.FileResult{
  file_id: term(),
  file_uri: term(),
  filename: term(),
  mime_type: term(),
  provider: term(),
  raw: term(),
  size_bytes: term()
}
```

# `new`
[🔗](https://github.com/brainlid/langchain/blob/v0.8.4/lib/file_uploaders/file_result.ex#L40)

```elixir
@spec new(attrs :: map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}
```

Build a new FileResult and return an `:ok`/`:error` tuple with the result.

# `new!`
[🔗](https://github.com/brainlid/langchain/blob/v0.8.4/lib/file_uploaders/file_result.ex#L52)

```elixir
@spec new!(attrs :: map()) :: t() | no_return()
```

Build a new FileResult and return it or raise an error if invalid.

---

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