# Variable: octetInputParser

> 

> `const` **octetInputParser**: `UtilityParser`\<`OctetInput`, `ReadableStream`\>

Defined in: [packages/server/src/unstable-core-do-not-import/http/contentTypeParsers.ts:39](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/http/contentTypeParsers.ts#L39)

An input validator for binary data, such as a `File` or `Blob`. The
resolver gets the input as a `ReadableStream`.

## Example

```ts
t.procedure.input(octetInputParser).mutation(async ({ input }) => {
  const bytes = await new Response(input).arrayBuffer();
  return { size: bytes.byteLength };
});
```

## See

https://trpc.io/docs/server/non-json-content-types#file-and-other-binary-type-inputs
