WebHareBlob | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Class WebHareBlobAbstract

    Interface to streamable binary buffers that may come from eg. disk, memory or database

    Implements

    • Blob
    Index

    Constructors

    • Parameters

      • size: number
      • type: string

      Returns WebHareBlob

    Accessors

    • get size(): number

      Returns number

    • get type(): string

      Returns string

    Methods

    • Returns Readonly<Uint8Array<ArrayBufferLike>>

    • Parameters

      • databaseid: string

      Returns void

    • Get the blob contents as an ArrayBuffer. You should be careful with this API on large blobs (especially 10MB and above) as they will be fully loaded into the JavaScript heap and may cause memory pressure.

      Returns Promise<ArrayBuffer>

    • Returns Promise<Uint8Array<ArrayBufferLike>>

    • Returns Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>

      Use stream() instead

    • Parameters

      • Optionalstart: number
      • Optionalend: number
      • OptionalcontentType: string

      Returns Blob

    • Returns ReadableStream<Uint8Array<ArrayBufferLike>>

    • Returns Promise<string>

    • Create a in-memory WebHareBlob from a string or buffer

      Parameters

      • str:
            | string
            | ArrayBufferLike
            | Uint8Array<ArrayBufferLike>
            | ArrayBufferView<ArrayBufferLike>
            | Buffer<ArrayBufferLike>
            | DataView<ArrayBufferLike>
      • __namedParameters: { type?: string } = {}

      Returns WebHareBlob

    • Create a WebHare blob from a JavaScript Blob, copying the data

      Parameters

      • blob: Blob
      • __namedParameters: { type?: string } = {}

      Returns Promise<WebHareBlob>

    • Create a WebHare blob from a file on disk

      Parameters

      • path: string

      Returns Promise<WebHareBlob>

    • Parameters

      • thingy: unknown

      Returns thingy is WebHareBlob