code: function blobToBase64(blob) {
          var reader = new FileReader();
          var p = new Promise(function (success, fail) {
              reader.onloadend = function () {
                  var base64 = reader.result;
                  success(base64);
              };
              reader.onerror = function (e) {
                  fail(e);
              };
          });
  
          reader.readAsDataURL(blob);
  
          return p;
      }
docs: Convert Blob object to base64string
  @param {Blob} blob
  @returns {Promise} success(base64 string), fail(error)