Type Alias WritableFileAdapterStream

WritableFileAdapterStream: WritableFileAdapterCommonSettings & {
    data: FileAdapterStream;
    fileSizeInBytes: number | null;
}

Configuration for writing file content as an async stream. Extends common HTTP headers with streaming file data.

Used when file content is too large for memory or comes from a streaming source. Content is transmitted in chunks, allowing memory-efficient processing.

IMPORT_PATH: "@daiso-tech/core/file-storage/contracts"

Type declaration

  • data: FileAdapterStream

    Async iterable stream of file content chunks. Each chunk is a Uint8Array produced sequentially as iteration progresses. Used for large files, piped sources, or real-time content generation.

  • fileSizeInBytes: number | null

    Total expected file size in bytes. If known, helps storage backends pre-allocate space and validate quota. Null when size cannot be determined upfront (e.g., streamed from external API). If null, storage must accept streams of unknown size.