basalt / storage/src / PutStreamInput
Interface: PutStreamInput
Defined in: storage/src/index.ts:193
Options for Disk.putStream.
Extends
Properties
allowedContentTypes?
> optional allowedContentTypes?: readonly string[]
Defined in: storage/src/driver.ts:17
Facade-enforced content-type allowlist. When set, the facade rejects an upload whose contentType is missing or not in this list with STORAGE_CONTENT_TYPE. Opt-in: with no value, any content type is allowed.
Inherited from
PutStreamOptions.allowedContentTypes
contentLength?
> optional contentLength?: number
Defined in: storage/src/driver.ts:38
Exact body size in bytes when the caller knows it. Backends that cannot upload a body of unknown length in one request (S3 PutObject) stream it straight through with it. The Disk layer has already checked it is a non-negative safe integer, and the readable a driver receives errors (STORAGE_CONTENT_LENGTH_MISMATCH) before its end if the body carries more or fewer bytes — a driver may declare it to its backend as-is.
Inherited from
PutStreamOptions.contentLength
contentType
> contentType: string
Defined in: storage/src/index.ts:199
Required: a streaming upload has no bytes to fall back on, so the type is declared up front. It is checked against allowedContentTypes before a single byte is read.
Overrides
maxBytes?
> optional maxBytes?: number
Defined in: storage/src/driver.ts:11
Facade-enforced upload cap. When set, the facade rejects content larger than this many bytes with STORAGE_TOO_LARGE before delegating to the driver. Enforced for Buffer/string inputs, whose byte length is known up front. Opt-in: with no value, uploads are uncapped as before.