Class WebHareBlobAbstract
Implements
- Blob
Index
Constructors
Accessors
Methods
Constructors
constructor
Parameters
- size: number
- type: string
Returns WebHareBlob
Methods
__get As SyncUInt8 Array
Returns Readonly<Uint8Array<ArrayBufferLike>>
__registerPGUpload
Parameters
- databaseid: string
Returns void
array Buffer
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>
bytes
Returns Promise<Uint8Array<ArrayBufferLike>>
get Stream
Abstract
slice
Parameters
Optional
start: numberOptional
end: numberOptional
contentType: string
Returns Blob
Abstract
stream
Returns ReadableStream<Uint8Array<ArrayBufferLike>>
text
Returns Promise<string>
Static
from
- from(
str:
| string
| ArrayBufferLike
| Uint8Array<ArrayBufferLike>
| ArrayBufferView<ArrayBufferLike>
| Buffer<ArrayBufferLike>
| DataView<ArrayBufferLike>,
__namedParameters?: { type?: string },
): WebHareBlobCreate 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
- str:
Static
from Blob
Create a WebHare blob from a JavaScript Blob, copying the data
Parameters
- blob: Blob
- __namedParameters: { type?: string } = {}
Returns Promise<WebHareBlob>
Static
from Disk
Static
is Web Hare Blob
Parameters
- thingy: unknown
Returns thingy is WebHareBlob
Interface to streamable binary buffers that may come from eg. disk, memory or database