docs: verify and refactor documentation to match current codebase

This commit is contained in:
Pontoporeia
2026-08-24 11:31:38 +02:00
parent b2cdbd0174
commit e9747edce0
17 changed files with 1006 additions and 1442 deletions
+27 -26
View File
@@ -93,35 +93,34 @@ Files whose MIME type is `application/octet-stream` are accepted **only if their
Max size: **20 MB**.
### Banner image (`banner` input)
### Banner image
| Extension | MIME type |
|-----------|-----------|
| `.jpg` / `.jpeg` | `image/jpeg` |
| `.png` | `image/png` |
| `.webp` | `image/webp` |
Landscape format recommended (4:1 ratio). Max size: **20 MB**.
> Removed — the home-page banner was merged into covers (migration
> `028_drop_banner_path.sql`). There is no separate banner upload anymore.
---
## Size limits
| Limit | Value |
|-------|-------|
| Per-file limit (TFE content files) | **500 MB** |
| PHP `upload_max_filesize` | 512 MB |
| PHP `post_max_size` | 520 MB |
| Cover image | 20 MB |
| Banner image | 20 MB |
Per-field limits are enforced in `app/src/Controllers/validate-file-fragment-shared.php`
(server-side `finfo` + size check on every upload):
The PHP limits are set in:
| Field | Max size | Accepted content |
|-------|----------|------------------|
| `tfe` (main files) | **500 MB** default; **PDF capped at 100 MB**; **video/audio up to 5 GB** | PDF, images, video, audio, archives |
| `annexes` | **500 MB** (PDF capped at 100 MB, video/audio up to 5 GB) | PDF, archives, images, media |
| `couverture` (cover) | **20 MB** | JPG / PNG / WEBP |
| `note_intention` | **100 MB** | PDF |
| File | Applies to |
|------|------------|
| `app/public/.htaccess` | Apache (`mod_php`) |
| `app/public/.user.ini` | PHP-FPM / nginx |
| `justfile` — `serve` recipe | PHP built-in dev server (`php -S` ignores both files above, so limits are passed via `-d` flags) |
(Admins bypass validation entirely — `admin_mode=1`.)
The PHP engine limits are set as follows:
| File | Applies to | `upload_max_filesize` | `post_max_size` |
|------|------------|----------------------|------------------|
| `app/public/.user.ini` | PHP-FPM / nginx | 8192M | 8704M |
| `app/public/.htaccess` | Apache (`mod_php`) | 512M | 1024M |
| `justfile` — `dev` recipe | PHP built-in dev server (`php -S` ignores the files above, so limits are passed via `-d` flags) | 8192M | 8704M |
For environments that require different limits, edit all three.
@@ -160,8 +159,6 @@ Files are stored outside the webroot in `app/storage/`.
app/storage/
├── covers/
│ └── <random-hex>.jpg # cover images
├── banners/
│ └── <random-hex>.jpg # home-page banners
└── theses/
└── <year>/
└── <YEAR>_<AUTHOR_SLUG>/
@@ -203,8 +200,9 @@ CREATE TABLE thesis_files (
file_size INTEGER, -- bytes
mime_type TEXT,
description TEXT, -- legacy caption field
display_label TEXT, -- per-file caption (migration 007)
sort_order INTEGER NOT NULL DEFAULT 0, -- display order (migration 007)
display_label TEXT, -- per-file caption
sort_order INTEGER NOT NULL DEFAULT 0, -- display order
file_hash TEXT, -- stored hash (optional)
uploaded_at DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (thesis_id) REFERENCES theses(id) ON DELETE CASCADE
);
@@ -225,7 +223,10 @@ Files are queried ordered by `sort_order ASC, uploaded_at ASC`.
| `app/templates/partials/form/fieldset-files.php` | Upload UI partial (add / partage forms) |
| `app/templates/admin/edit.php` | Edit-form files section (sortable existing files + new upload queue) |
| `app/templates/public/tfe.php` | Public rendering of all file types |
| `app/public/assets/js/file-upload-queue.js` | SortableJS-backed upload queue + legacy preview |
| `app/src/Controllers/FilepondHandler.php` + `app/public/assets/js/app/file-upload-filepond.js` | FilePond-backed upload queue |
| `app/public/.htaccess` | PHP upload limits (Apache) |
| `app/public/.user.ini` | PHP upload limits (PHP-FPM / nginx) |
| `app/migrations/applied/007_thesis_files_sort_and_label.sql` | DB migration adding `sort_order` + `display_label` |
> Note: the upload UI was migrated from the legacy SortableJS `file-upload-queue.js`
> to **FilePond** (`file-upload-filepond.js` + `FilepondHandler.php`).