You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Convert any file to base64 in VBCS

Accepted answer


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


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 =;  

              //Converting Binary Data to base 64    

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!