MCPcopy Create free account
hub / github.com/Botloader/botloader / dataUri

Method dataUri

components/runtime/src/ts/image.ts:91–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89 }
90
91 dataUri(): string {
92 const imageDataEncoded = base64Encode(new Uint8Array(this.data))
93 const mimeType = formatMimeType(this.properties.formatName)
94
95 return "data:" + mimeType + ";base64," + imageDataEncoded
96 }
97}
98
99export type ImageTranscodeOptions = {

Callers 4

createEmojiFunction · 0.80
createWebhookFunction · 0.80
editWebhookFunction · 0.80
editWebhookWithTokenFunction · 0.80

Calls 2

base64EncodeFunction · 0.90
formatMimeTypeFunction · 0.85

Tested by

no test coverage detected