function saveFile(url, name) {
var root = document.body;
var link = document.createElement('a');
link.href = url;
link.setAttribute('download', name || '');
link.onclick = function () {
root.removeChild(link);
};
root.appendChild(link);
link.click();
}