Base64Utils Class

Module: BinaryUtils

Base64Utils contains methods to convert from and to Base64 binary format.

Methods

fromArraybuffer

(
  • arraybuffer
)
String

Create base64 string from arraybuffer.

Parameters:

  • arraybuffer Arraybuffer

Returns:

String:

base64

fromBinaryString

(
  • str
)
String

Create base64 string from binary string.

Parameters:

  • str String

Returns:

String:

base64

getFileFormat

(
  • data
)
String

Get the file format present in the base64 string.

Parameters:

  • data String

    Base64 data.

Returns:

String:

File format present in the JSON data.

removeHeader

(
  • base64
)
String

Remove base64 header from data.

Usefull for removing the heander from image, audio, video, etc.

Parameters:

  • base64 String

Returns:

String:

base64

Attributes

encoding

String

Charset used to encode binary data.