function getChangeListener(selectNameElement) {
return function() {
const fileName = this.files[0].name
selectNameElement.innerText = filename.slice(0, 15)+ "...." + filename.substring(filename.length - 5);
}
}
fileInput.addEventListener('change', getChangeListener(selectName))
fileInput2.addEventListener('change', getChangeListener(selectName2))
var elements = document.getElementsByClassName('toggle__button');
Array.from(elements).forEach(function(element) {
element.addEventListener('click', function() {
this.nextElementSibling.classList.toggle('hide');
});
});