MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / _blobToDataURL

Method _blobToDataURL

src/monogatari.ts:209–216  ·  view source on GitHub ↗
(blob: Blob)

Source from the content-addressed store, hash-verified

207
208 // Read a stored screenshot Blob into a data-URL string for display.
209 private static _blobToDataURL (blob: Blob): Promise<string> {
210 return new Promise ((resolve, reject) => {
211 const reader = new FileReader ();
212 reader.onload = () => resolve (reader.result as string);
213 reader.onerror = () => reject (reader.error ?? new Error ('Failed to read screenshot blob'));
214 reader.readAsDataURL (blob);
215 });
216 }
217
218 // Screenshot callbacks with defaults. Override to customize screenshot storage.
219 private static _onSaveScreenshot: (slotKey: string, blob: Blob) => Promise<string> = async (slotKey, blob) => {

Callers 1

MonogatariClass · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected