1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-06-30 22:50:11 +02:00

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;