Skip to content

basalt / files/src / UploadInput

Interface: UploadInput ​

Defined in: files/src/files.ts:171

Properties ​

contentLength? ​

> optional contentLength?: number

Defined in: files/src/files.ts:190

Exact body size in bytes when the client declared one (an HTTP Content-Length). Passing it lets the upload stream straight into backends that want a known length (S3 PutObject).

A declaration, and held to it: a value that is not a non-negative safe integer is refused before the body is read (400 STORAGE_CONTENT_LENGTH_INVALID), one past validate.maxSize is refused with FileTooLargeError (413), and a body that carries a different number of bytes fails with 400 STORAGE_CONTENT_LENGTH_MISMATCH — leaving neither a record nor an object. The record's size is always the measured one.


contentType ​

> contentType: string

Defined in: files/src/files.ts:173


metadata? ​

> optional metadata?: FileMetadata

Defined in: files/src/files.ts:176


name ​

> name: string

Defined in: files/src/files.ts:172


tenantId? ​

> optional tenantId?: string

Defined in: files/src/files.ts:174


uploadedBy? ​

> optional uploadedBy?: string

Defined in: files/src/files.ts:175

Released under the MIT License.