Skip to content

Commit

Permalink
Update fileInput.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Frooodle authored Aug 6, 2023
1 parent 379791a commit 8bb9e5b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/resources/static/js/fileInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8bb9e5b

Please sign in to comment.