secubox-deb/packages/secubox-billets/api
CyberMind-FR db74e02ffc feat(billets): image upload with zoomable vignette gallery + portable export
- Upload images (png/jpeg/webp/gif ≤5 MiB) alongside the text of a billet:
  multi-image mini-gallery. New api/services/media.py validates + FULLY
  re-encodes every upload via Pillow (drops EXIF/GPS, neutralises polyglots;
  SVG refused), producing a cleaned original + a ≤480px thumbnail.
- Storage under BILLETS_MEDIA_DIR (/var/lib/secubox/billets/media), served by
  nginx /media/ alias (in-process StaticFiles fallback). img-src 'self' already
  covers it — no third party, no CSP relaxation.
- Public: vignette grid in feed + permalink, pure-JS zoomable lightbox with
  ◀▶ keyboard/arrow navigation (graceful degradation: links open the full
  image with JS off). First image drives og:image / twitter:image.
- Admin editor: multipart file input + existing-media thumbnails with delete.
  New media table (migration 0002, ON DELETE CASCADE), repo CRUD, media delete
  route; billet delete removes files. All Pillow work off the event loop
  (asyncio.to_thread).
- Portable backup: GET /admin/export.sbxsite emits every billet + media inlined
  as base64 (single re-importable file).
- nginx client_max_body_size 6m; requirements pillow==11.1.0. 104 tests (11 new).

Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-12 08:11:43 +02:00
..
migrations feat(billets): image upload with zoomable vignette gallery + portable export 2026-07-12 08:11:43 +02:00
routes feat(billets): image upload with zoomable vignette gallery + portable export 2026-07-12 08:11:43 +02:00
services feat(billets): image upload with zoomable vignette gallery + portable export 2026-07-12 08:11:43 +02:00
static feat(billets): image upload with zoomable vignette gallery + portable export 2026-07-12 08:11:43 +02:00
templates feat(billets): image upload with zoomable vignette gallery + portable export 2026-07-12 08:11:43 +02:00
__init__.py
asgi.py feat(billets): step 7 — ASGI entrypoint, systemd/nginx/debian deploy, README 2026-07-11 15:52:08 +02:00
db.py feat(billets): SecuBox webui panel + navbar integration 2026-07-11 16:19:35 +02:00
ids.py
main.py feat(billets): image upload with zoomable vignette gallery + portable export 2026-07-12 08:11:43 +02:00
manage.py feat(billets): step 7 — ASGI entrypoint, systemd/nginx/debian deploy, README 2026-07-11 15:52:08 +02:00
models.py
repo.py feat(billets): image upload with zoomable vignette gallery + portable export 2026-07-12 08:11:43 +02:00
seed.py