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); };