cleanup modal: list stale files to remove; storage restructure: documents/ → {objet}/

This commit is contained in:
Pontoporeia
2026-05-19 22:00:10 +02:00
parent c6199525f9
commit defc919cd0
19 changed files with 292 additions and 22 deletions

View File

@@ -188,10 +188,11 @@ class ThesisCreateController
}
// ── 5. File uploads (outside transaction — filesystem ops) ────────────
$tf = $this->buildThesisFolder($data['annee'], $allAuthorsStr, $data['titre']);
$objet = $data['objet'] ?? 'tfe';
$tf = $this->buildThesisFolder($data['annee'], $allAuthorsStr, $data['titre'], $objet);
$folderName = $this->ensureUniqueFolder($tf['folderPath']);
// Rebuild path with potentially modified folder name
$folderPath = 'documents/' . $data['annee'] . '/' . $folderName . '/';
$folderPath = $objet . '/' . $data['annee'] . '/' . $folderName . '/';
$filePrefix = $folderName;
if (!empty($post['filepond_mode'])) {