@backblaze-labs/b2-sdk - v0.1.0
    Preparing search index...

    Interface DownloadCallOptions

    Options accepted by B2Object.download and B2Object.downloadById.

    interface DownloadCallOptions {
        b2CacheControl?: string;
        b2ContentDisposition?: string;
        b2ContentEncoding?: string;
        b2ContentLanguage?: string;
        b2ContentType?: string;
        b2Expires?: string;
        method?: "GET" | "HEAD";
        onProgress?: ProgressListener;
        range?: string;
        serverSideEncryption?: SseCDownloadKey;
        signal?: AbortSignal;
    }
    Index

    Properties

    b2CacheControl?: string

    Override the response Cache-Control header.

    b2ContentDisposition?: string

    Override the response Content-Disposition header.

    b2ContentEncoding?: string

    Override the response Content-Encoding header.

    b2ContentLanguage?: string

    Override the response Content-Language header.

    b2ContentType?: string

    Override the response Content-Type header.

    b2Expires?: string

    Override the response Expires header.

    method?: "GET" | "HEAD"

    HTTP method. Defaults to 'GET'. Use 'HEAD' to fetch only response headers. Prefer the dedicated B2Object.head / Bucket.head method over this option — those return a body-less result so callers never have to remember to drain the empty body of a HEAD response.

    onProgress?: ProgressListener

    Callback invoked as the response body is consumed.

    Progress is byte-driven, not request-driven: the callback fires per chunk as the caller reads the returned body stream, and the final partsCompleted: 1 event only fires once the stream is read to completion. Downloads that are dropped or aborted partway through will NOT emit a completePart() event.

    range?: string

    HTTP Range header value (e.g., "bytes=0-999").

    serverSideEncryption?: SseCDownloadKey

    SSE-C decryption parameters, required if the file was uploaded with SSE-C.

    signal?: AbortSignal

    Abort signal for cancelling the download.