# ASB Upload Admin + File API (Session-only)

## Was ist das?
- Kleines Admin-Panel: Upload + Übersicht + aktiv/inaktiv + optionales Passwort + Löschen
- File-API: Preview & Download + Counters + Event-Log

## Setup
1) **DB Tabellen anlegen**
   - `schema.sql` ausführen

2) **Config anlegen**
   - `public/inc/config.example.php` -> `public/inc/config.php`
   - DB Zugangsdaten + Admin User/Pass anpassen

3) **Uploads schützen**
   - In `/public/uploads/.htaccess` ist direkter Zugriff gesperrt.

## URLs
- Admin: `/admin/index.php`
- Preview: `/api/file.php?id=<ID>`
- Download: `/api/file.php?id=<ID>&dl=1`
- Wenn Datei Passwort hat:
  - `/api/file.php?id=<ID>&token=<PASSWORT>`

## Optional: Pretty Links wie früher
- `/do<ID>` wird via `/public/.htaccess` auf die API umgeschrieben.

## Hinweis
- Für größere Dateien: nicht in MySQL speichern. Hier liegen Dateien im `uploads/` Ordner, MySQL nur Metadaten.
