📅  最后修改于: 2022-03-11 15:00:24.885000             🧑  作者: Mango
var reader = new FileReader();
reader.fileName = file.name // file came from a input file element. file = el.files[0];
reader.onload = function(readerEvt) {
console.log(readerEvt.target.fileName);
};