MCPcopy Create free account
hub / github.com/editablejs/editable / readBase64

Function readBase64

packages/plugins/image/src/utils.ts:38–40  ·  view source on GitHub ↗
(file: File | string)

Source from the content-addressed store, hash-verified

36}
37
38export const readBase64 = (file: File | string) => {
39 return typeof file === 'string' ? readBase64WithFetch(file) : readBase64WithFileReader(file)
40}
41
42export const readImageElement = (url: string, base64 = false) => {
43 return new Promise<HTMLImageElement>(async (resolve, reject) => {

Callers 2

readImageElementFunction · 0.85
defaultUploadFunction · 0.85

Calls 2

readBase64WithFetchFunction · 0.85
readBase64WithFileReaderFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…