document.querySelector('input[name="file"]').addEventListener('change', (e) => { const file = e.target.files[0]; // todo: use file pointer });