Hey Tapas thanks for sharing!
I'm trying to recreate the very first simple file upload using your code, but getting like 5 console.logs instead of 1??
Am I doing something wrong?

The code: const fileUploader = document.getElementById('file-uploader');
fileUploader.addEventListener('change', (event) => {
const files = event.target.files;
console.log('files', files);
});