util.Strings.base64Encode

Converts the content of a file to a Base64 encoded string.

Syntax

util.Strings.base64Encode(
  filename STRING
 )
  RETURNING result STRING
  1. filename is the name of the file to read from.
  2. result is the resulting Base64 encoded string.

Usage

The util.Strings.base64Encode() method reads the content of the file passed as parameter, and converts the bytes to a Base64 encoded string.

Example

IMPORT util
MAIN
    DISPLAY util.Strings.base64Encode( "picture.png" )
END MAIN