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 URL.asBase64DataUrl(mimeType: MimeType = ContentType.defaultForFilePath(this.path).asMimeType()): String
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.
See also
fun Path.asBase64DataUrl(mimeType: MimeType = ContentType.Companion
.defaultForFilePath(
fileName.toString(),
).asMimeType()): String