To convert base64 string to ArrayBuffer with JavaScript, we use the Buffer.from
method.
For instance, we write
const myBuffer = Buffer.from(someBase64String, "base64");
to call Buffer.from
with the someBase64String
base64 string and 'base64'
to convert the base 64 string to a buffer.