Update fileInput.js

This commit is contained in:
Anthony Stirling 2023-08-06 14:16:56 +01:00 committed by GitHub
parent 379791a326
commit 8bb9e5b22f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,9 +80,10 @@ function setupFileInput(chooser) {
document.body.addEventListener('dragleave', dragleaveListener);
document.body.addEventListener('drop', dropListener);
$("#" + elementId).on("change", function() {
handleFileInputChange(this);
});
$("#" + elementId).on("change", function(e) {
allFiles = Array.from(e.target.files);
handleFileInputChange(this);
});
function handleFileInputChange(inputElement) {
const files = allFiles;