const file_inputs = document.getElementsByClassName('file_input');
const filename_displays = document.getElementsByClassName('file_input_feedback');

for (let i = 0; i < file_inputs.length; i++) {
  file_inputs[i].addEventListener('change', function() {
    const selected_file = event.target.files[0];
    if (selected_file)
      filename_displays[i].textContent = 'File uploaded: ' + selected_file.name;
    else
      filename_displays[i].textContent = 'No file selected.';
  })
}
