Convert any file to base64 in VBCS
Summary:
Hi all i am trying to convert file to base64 in VBCS.
Content (required):
Whenever we are converting file to base64 it is a good practice to use promise. I am using the same but the file conversion is happening after completion of the function.
Version (include the version you are using, if applicable):
Visual Builder Runtime Version
2307.0.0
Code Snippet (add any code snippets that support your topic, if applicable):
This is one Function
var reader = new FileReader();
// Closure to capture the file information.
reader.onload = (function (theFile)
{
return function (e)
{
var binaryData = e.target.result;
//Converting Binary Data to base 64
Tagged:
0