📜  FileReader 获取文件名 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:24.885000             🧑  作者: Mango

代码示例1
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);
};