Beignet API reference
    Preparing search index...

    Object metadata plus a one-shot readable body.

    Like Fetch response bodies, storage bodies can be consumed once. Call get again if you need another reader.

    interface StorageObjectBody {
        bodyUsed: boolean;
        cacheControl?: string;
        contentType?: string;
        key: string;
        lastModified: Date;
        metadata: StorageMetadata;
        size: number;
        visibility: StorageVisibility;
        arrayBuffer(): Promise<ArrayBuffer>;
        bytes(): Promise<Uint8Array<ArrayBufferLike>>;
        stream(): ReadableStream<Uint8Array<ArrayBufferLike>>;
        text(): Promise<string>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    bodyUsed: boolean

    Whether this object body has already been consumed. Like Fetch response bodies, storage bodies are one-shot so providers can stream objects without buffering them.

    cacheControl?: string
    contentType?: string
    key: string

    Object key. Keys are relative object-store paths, not filesystem paths or public URLs.

    lastModified: Date

    Last modification timestamp.

    metadata: StorageMetadata

    Provider metadata stored with the object.

    size: number

    Object size in bytes.

    visibility: StorageVisibility

    Object visibility.

    Methods

    • Consume the object as an ArrayBuffer.

      Returns Promise<ArrayBuffer>

    • Consume the object as bytes.

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • Consume the object as a readable byte stream.

      Returns ReadableStream<Uint8Array<ArrayBufferLike>>

    • Consume the object as UTF-8 text.

      Returns Promise<string>