I have found a plugin for javascript which may be usefull for you in this case, it is developed to download the base64 content with MIME types specified .
Moreover
Please have a look at this answer which explains how to download the base64 encoded content .
function fnExport(base64encodedstring) {
var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE ");
// If Internet Explorer:
if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {
txtArea1.document.open("content type", "replace");
txtArea1.document.write(base64encodedstring);
txtArea1.document.close();
txtArea1.focus();
sa = txtArea1.document.execCommand("SaveAs", true, reportname + ".extension");
console.log(sa);
}
else { //other browser not tested on IE 11
sa = window.open('data:content-type;base64,' +base64encodedstring);
}
return (sa);
}