let uploader = document.createElement('input');
uploader.type = 'file';
uploader.onchange = () => {
let files = uploader.files;
if (files.length <= 0) {
return false;
}
let fr = new FileReader();
fr.onload = (e) => {
const data = e.target.result;
//...