toBase64

open override fun toBase64(): String(source)

Converts the file content to a Base64 encoded string. This method supports encoding for files with a local path source. For URL sources, an exception is thrown since encoding is not supported directly.

Return

Base64 encoded string representation of the file content if the file source is a local path.

Throws

if the file source is a URL as encoding is not supported.