# encodeBinaryBody

**Kind:** Function

**Source:** [`atloria-monorepo/packages/ui-core/src/components/api-explorer/multipart.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/ui-core/src/components/api-explorer/multipart.ts#L206)

A raw-bytes body for the same envelope. `application/octet-stream` sends the file ITSELF, not
a form, so it cannot be smuggled through as a part — it needs its own field, and it hits the
same `JSON.stringify(File) === '{}'` trap if it is left as-is.

## Signature

```ts
async function encodeBinaryBody(blob: Blob): Promise<{ base64: string; bytes: number }>
```

## Parameters

| Name | Type |
|---|---|
| `blob` | `Blob` |

**Returns:** `Promise<{ base64: string; bytes: number }>`
