<div>
  <h1>Upload multiple files</h1>
  <input type="file" id="file-uploader" multiple>
  <p>Upload multiple files and see the output in browser console</p>
  <p id="feedback"></p>
</div>
html {
  height: 100%;
}

body {
  background: white;
  color: black;
}

div {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  font-family: 'Roboto Mono', monospace;
}
const fileUploader = document.getElementById('file-uploader');

fileUploader.addEventListener('change', (event) => {
  const files = event.target.files;
  console.log('files', files);
  
  // show the upload feedback
  const feedback = document.getElementById('feedback');
  const msg = `${files.length} file(s) uploaded successfully!`;
            feedback.innerHTML = msg;
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.