From 6a37d21f3fc04b931f6fc301a97d385ca2f7451a Mon Sep 17 00:00:00 2001 From: Pontoporeia Date: Thu, 30 Apr 2026 13:22:37 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20add=20file-uploads.md=20=E2=80=94=20acc?= =?UTF-8?q?epted=20types,=20limits,=20storage,=20ordering,=20security?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TODO.md | 1 + docs/file-uploads.md | 223 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 224 insertions(+) create mode 100644 docs/file-uploads.md diff --git a/TODO.md b/TODO.md index 67409d4..4f5a995 100644 --- a/TODO.md +++ b/TODO.md @@ -15,6 +15,7 @@ - [x] **form.css** — styles for `.tfe-file-queue`, `.fq-item`, `.admin-file-list-item` (sortable), drag handles, label inputs, ghost class - [x] **PHP upload limits** — `.htaccess` + `.user.ini` in `public/` with `upload_max_filesize=512M` / `post_max_size=520M` - [x] **add.php / edit.php / partage/index.php** — use `sortable.min.js` + `file-upload-queue.js` instead of `file-preview.js` +- [x] **docs/file-uploads.md** — reference document covering accepted types, size limits, storage layout, ordering, labels, security, and source file index ## Previously completed - [x] Multi-file upload for thesis files (basic) diff --git a/docs/file-uploads.md b/docs/file-uploads.md new file mode 100644 index 0000000..71fce27 --- /dev/null +++ b/docs/file-uploads.md @@ -0,0 +1,223 @@ +# File Uploads + +Reference for all file upload handling in XAMXAM: accepted types, size limits, storage layout, display behaviour, and ordering. + +--- + +## Upload surfaces + +There are three forms where files can be uploaded: + +| Surface | Path | Who uses it | +|---------|------|-------------| +| Admin — add thesis | `/admin/add.php` | Administrator | +| Admin — edit thesis | `/admin/edit.php?id=N` | Administrator | +| Student submission | `/partage/` | Student via share link | + +All three surfaces share the same backend controller logic (`ThesisCreateController` / `ThesisEditController`) and the same validation rules. + +--- + +## File categories + +Each uploaded file is assigned a `file_type` that controls how it is displayed on the public TFE page. + +| `file_type` | How displayed | Trigger | +|-------------|---------------|---------| +| `main` | Inline `