🚀 Welcome to MDriven Learn –  Don’t miss the latest Release Notes.
OCLOperators BlobToBase64

BlobToBase64 converts a Blob / Binary attribute into a Base64-encoded string.

Examples

Customer.allInstances()->first().ProfilePicture.BlobToBase64

Result Returns a single Base64 string

Explanation

  • first() selects one concrete instance
  • BlobToBase64 operates on one Blob attribute
Customer.allInstances()->collect(x | x.ProfilePicture.BlobToBase64)

Result Returns a collection of Base64 strings

Explanation

collect explicitly iterates over the collection

Each ProfilePicture Blob is converted individually

The result is a new collection of strings