Skip to content

FileProcessorInput

FileProcessorInput = object

Defined in: packages/schema/src/files/file-options.ts:2

What a processor gets: the stored upload’s decided type, size and name, its first bytes, and the whole of it on demand.

head: Uint8Array

Defined in: packages/schema/src/files/file-options.ts:10

The first bytes of the content (up to 256 KB), enough for image headers.


name: string

Defined in: packages/schema/src/files/file-options.ts:4

The file’s name, its extension matched to the decided type.


size: number

Defined in: packages/schema/src/files/file-options.ts:8

The size in bytes.


type: string

Defined in: packages/schema/src/files/file-options.ts:6

The type decided from the content, such as image/jpeg.

read(): Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>

Defined in: packages/schema/src/files/file-options.ts:12

The whole content, read from storage.

Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>