mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 08:09:18 +02:00
The partage/admin form had a hardcoded filepond_mode=1 hidden input, so without JavaScript the server always entered the FilePond async path — which found no hex IDs and silently dropped all files. Three-layer fix: 1. HTML: filepond_mode input starts disabled with value=0; JS enables it and sets value=1 on DOMContentLoaded (and after HTMX swaps). Disabled inputs aren't submitted → server gets no filepond_mode → naturally falls to legacy path. 2. JS: enableFilepondMode() called on page load and hx:afterSwap so FilePond-enhanced forms always send filepond_mode=1. 3. Server (defense-in-depth): ThesisFileHandler::hasFilePondQueueData() scans POST['queue_file'] for 32-char hex IDs; ThesisCreateController and ThesisEditController use it alongside filepond_mode, so even if the flag somehow arrives without async upload IDs, the path takes over.
26 KiB
26 KiB