$('.xm-form').on("submit", function() {
var $b64Inp = $('[name="varImgBase64String"]');
var $uplImg = $('[name="uplImg"]');
uplToB64String($uplImg, $b64Inp);
});
function uplToB64String($uplImg, $b64Inp) {
var id = $uplImg.attr('id');
var b64 = ($.xutil._file_store[id]) ? $.xutil._file_store[id].b64 : null;
if (b64) $b64Inp.val(b64.split(',')[1]);
}