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

    Function toContentSource

    • Convert a Uint8Array, Blob, ReadableStream, or async iterable into a ContentSource. When passing a ReadableStream or async iterable, the size parameter is required.

      Parameters

      • input:
            | Blob
            | Uint8Array<ArrayBufferLike>
            | ReadableStream<Uint8Array<ArrayBufferLike>>
            | AsyncIterable<Uint8Array<ArrayBufferLike>, any, any>

        The content to wrap.

      • Optionalsize: number

        The total byte length, required for forward-only inputs.

      Returns ContentSource

      A ContentSource adapter for the given input.

      If input is forward-only and size is not provided.