fix: upload progress bar not visible — collectFileNames checks FilePond instances; remove admin auth from progress poll endpoint

This commit is contained in:
Pontoporeia
2026-05-11 16:55:58 +02:00
parent d873a7f09e
commit c3f6e8a033
4 changed files with 34 additions and 2 deletions

View File

@@ -33,6 +33,7 @@
function collectFileNames() {
const names = [];
// Check raw <input type="file"> elements (non-FilePond or FilePond-managed with storeAsFile)
const inputs = form.querySelectorAll('input[type="file"]');
for (const fi of inputs) {
if (fi.files) {
@@ -41,6 +42,21 @@
}
}
}
// Also check FilePond instances directly (their storeAsFile hidden inputs may not
// have .files populated yet when the submit event fires)
if (typeof FilePond !== 'undefined') {
const pondInputs = form.querySelectorAll('.tfe-file-picker');
for (const pi of pondInputs) {
const pond = FilePond.find(pi);
if (pond) {
const pondFiles = pond.getFiles();
for (const pf of pondFiles) {
const name = pf.filename || (pf.file && pf.file.name);
if (name) names.push(name);
}
}
}
}
return names;
}