The building block behind asImg() and
asFileLink(): reads a file and returns its contents
base64-encoded, ready to be placed in a data URI or in any container
format that carries binary payloads as text.
See also
Other html:
asFileLink(),
asHtml(),
asImg(),
escapeHtml(),
htmlNotation,
htmlSubscript,
preview(),
preview.html(),
toHtmlTable()
Examples
fn <- tempfile(fileext = ".txt")
writeLines("hello", fn)
substr(embedFile(fn), 1, 8)
#> [1] "aGVsbG8K"
unlink(fn)
