> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# LoadMediaOptions

> Interface exported by @botmesh/core.

Defined in: [core/context.ts:286](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/context.ts#L286)

Options of [loadMediaOf](https://botmesh.afaya.com.co/api/core/functions/loadMediaOf.md).

## Properties

### maxBytes?

```ts theme={null}
maxBytes?: number;
```

Defined in: [core/context.ts:292](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/context.ts#L292)

Refuse media larger than this many bytes with a `MediaTooLargeError`: checked
against the size the provider declared (before downloading anything) and
while reading the download, which is cut as soon as it goes over. Default: no cap.

***

### throwOnError?

```ts theme={null}
throwOnError?: boolean;
```

Defined in: [core/context.ts:294](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/context.ts#L294)

Reject with the download error instead of resolving `undefined`. Default `false`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.