/**
* @param fileTarget [dom object]
*/
function openFile(fileTarget) {
let file = fileTarget.files[0];
var blob = new Blob([file], {type: file.type + ";charset=utf-8"}),
Temp = document.createElement("a");
Temp.href = window.URL.createObjectURL(blob);
Temp.download = file.name;
$('body').append(Temp);
Temp.click();
}
网友评论