you can download a file that is in binary format by js
var file = new Blob(['R0lGODlhDwAPAKECAAAAzMzM/////wAAACwAAAAADwAPAAACIISPeQHsrZ5ModrLlN48CXF8m2iQ3YmmKqVlRtW4MLwWACH+H09wdGltaXplZCBieSBVbGVhZCBTbWFydFNhdmVyIQAAOw=='], {type: 'image/png'});
var fileURL = window.URL.createObjectURL(file);
var a = document.createElement("a");
a.href = fileURL;
a.download = "informe um nome";
document.body.appendChild(a);
a.click();
$(window).on('focus', function(e) {
$('a').remove();
});