as Base64Data Url
Converts the byte array into a Base64 encoded data URL string.
Return
The Base64 encoded data URL string containing the MIME type and the encoded content.
Parameters
mime Type
The MIME type to include in the data URL, specifying the media type of the data.
See also
fun File.asBase64DataUrl(mimeType: MimeType = ContentType.defaultForFile(this).toString()): String(source)
fun Path.asBase64DataUrl(mimeType: MimeType = ContentType.Companion
.defaultForFilePath(
fileName.toString(),
).asMimeType()): String(source)
fun URL.asBase64DataUrl(mimeType: MimeType = ContentType.defaultForFilePath(this.path).asMimeType()): String(source)
Converts the content of the URL into a Base64 encoded data URL string.
Return
The Base64 encoded data URL string containing the MIME type and the encoded content retrieved from the URL.
Parameters
mime Type
The MIME type to include in the data URL, specifying the media type of the URL's content.