Package-level declarations

Types

Link copied to clipboard
typealias MimeType = String

Represents the MIME type of content for use in operations involving media type definitions.

Functions

Link copied to clipboard
fun URL.asBase64DataUrl(mimeType: MimeType = ContentType.defaultForFilePath(this.path).asMimeType()): String

Converts the content of the URL into a Base64 encoded data URL string.

Converts the byte array into a Base64 encoded data URL string.

fun File.asBase64DataUrl(mimeType: MimeType = ContentType.defaultForFile(this).toString()): String
fun Path.asBase64DataUrl(mimeType: MimeType = ContentType.Companion .defaultForFilePath( fileName.toString(), ).asMimeType()): String
Link copied to clipboard
fun <Error class: unknown class>.asMimeType(): MimeType

Converts a ContentType instance to its corresponding MIME type string representation.