basalt / drives/src / DriveUploadInput
Interface: DriveUploadInput
Defined in: drives/src/provider.ts:526
One file to write back. See DriveProvider.upload for the per-adapter size ceilings, which are 4 MB / 5 MB / 150 MB and are not negotiable.
Properties
content
> content: Readable
Defined in: drives/src/provider.ts:530
The bytes. Streamed onto the socket and never buffered, at any size.
contentType
> contentType: string
Defined in: drives/src/provider.ts:528
folderId?
> optional folderId?: string
Defined in: drives/src/provider.ts:532
Destination folder; defaults to the connection root.
name
> name: string
Defined in: drives/src/provider.ts:527
size?
> optional size?: number
Defined in: drives/src/provider.ts:546
Length of content in bytes, when the caller knows it — and worth knowing, because it is what moves the refusal of an oversized file from mid-stream to up front.
With it, an adapter compares against its own ceiling before it opens a socket and throws DriveContentTooLargeError having sent nothing. Without it the upload starts, the byte cap trips part-way through and the request is destroyed — the same refusal, the same error, but after the bytes have been on the wire. It is never trusted in place of the cap: a source that under-reports its size is still caught by the bytes that actually flow.