loadDataUrlFromDisk

fun Document.loadDataUrlFromDisk(accept: String = "", onError: LoadContext.() -> Unit = {}, onLoad: LoadContext.(String) -> Unit)(source)

Like loadFromDisk but specifically loads some content from disk as a URL with base64-encoded data.

This is useful (necessary?) for loading images in a format that image elements can consume.

See loadFromDisk for details about the parameters.

See also

FileReader.readAsDataURL