Base64Utils Class
Base64Utils contains methods to convert from and to Base64 binary format.
Item Index
Attributes
Methods
fromArraybuffer
(
String
-
arraybuffer
Create base64 string from arraybuffer.
Parameters:
-
arraybuffer
ArrayBuffer
Returns:
String:
base64
fromBinaryString
(
String
-
str
Create base64 string from binary string.
Parameters:
-
str
String
Returns:
String:
base64
getFileFormat
(
String
-
data
Get the file format present in the base64 string.
Parameters:
-
data
StringBase64 data.
Returns:
String:
File format present in the JSON data.
isBase64
(
Boolean
-
data
Check if some data is encoded as base64.
This is a fast test that picks some random position in the string to check if they are valid base64 characters.
Parameters:
-
data
ObjectData to be tested.
Returns:
Boolean:
True if data is base64 encoded, false otherwise.
removeHeader
(
String
-
base64
Remove base64 header from data.
Usefull for removing the heander from image, audio, video, etc.
Parameters:
-
base64
String
Returns:
String:
base64