method IStorage.getStream
Since 0.2.0
IStorage.getStream(path: string): Promise<ReadableStream<Uint8Array>>

Retrieves an object as a streaming body for zero-copy downloads.

Providers that support native streaming (S3, GCS, Azure) return a live stream; others fall back to buffering the entire object into a one-chunk stream via get.

When omitted on the provider, the service wraps get in a one-chunk ReadableStream. Absent objects throw (mirroring get).

Parameters

path: string

Object path/key

Return Type

A ReadableStream of object bytes

Throws

Error

If the object does not exist

Usage

import { type IStorage } from "common/src/index.ts";