Calculates the Base64 representation of a string or binary
object. The Base64 format uses printable characters, allowing
binary data to be sent in forms and e-mail, and stored in a
database or file.
toBase64(string_or_object [, encoding])
→ returns string
utf-8iso-8859-1windows-1252us-asciishift_jisiso-2022-jpeuc-jpeuc-krbig5euc-cnutf-16Converts a String to a Base64-String.
ToBase64("Test String")
Expected Result: VGVzdCBTdHJpbmc=
Converts an Image Binary to a Base64-String.
ToBase64(ToBinary(ImageRead("example.jpg")))
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.