Bytes.fromBase64()

Convert a Base64-encoded string to an FQL Bytes value.

Signature

Bytes.fromBase64(encoded: String) => Bytes

Description

Converts a Base64-encoded string to an FQL Bytes value. A Bytes value stores a byte array, represented as a Base64-encoded string. You can use Bytes to store binary data in a Fauna database.

This method is equivalent to Bytes().

Parameters

Parameter Type Required Description

encoded

String

true

Base64-encoded string representing a byte array.

Return value

Type Description

Bytes

FQL Bytes value.

Examples

Bytes.fromBase64("SGVsbG8sIEZhdW5hIQ==")

The method returns an FQL Bytes value:

Bytes("SGVsbG8sIEZhdW5hIQ==")
\