You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- EVENTDATABASE_API_V2_CACHE_EXPIRE_SECONDS: What should the expire be for cache entries in EventDatabaseApiV2FeedType?
521
522
- TRACK_SCREEN_INFO: Should screen info be tracked (true|false)?
522
523
- TRACK_SCREEN_INFO_UPDATE_INTERVAL_SECONDS: How often (seconds) should the screen info be tracked from API requests?
524
+
- MEDIA_MAX_UPLOAD_SIZE_MB: Maximum allowed size (in megabytes, binary MiB) for media uploads. Enforced inside
525
+
`App\Controller\Api\MediaController` and exposed to the Admin via `/config/admin` so the dropzone size check and
526
+
the displayed "Max-size" label stay aligned. Must also be aligned with the nginx body-size limit and the PHP-FPM
527
+
upload/post limits — see [Configuring media upload size limits](#configuring-media-upload-size-limits) below.
528
+
529
+
**Default**: `200`.
530
+
531
+
Changes are picked up on the next request once PHP-FPM workers see the new env value (in production, restart the
532
+
php-fpm container or reload the workers). The admin UI re-fetches `/config/admin` on the next page load.
523
533
524
534
### Admin configuration
525
535
@@ -641,6 +651,21 @@ CLIENT_DEBUG=false
641
651
642
652
**Default**: Disabled.
643
653
654
+
### Configuring media upload size limits
655
+
656
+
The maximum size of an uploaded media file is enforced at three independent layers. They must be kept aligned —
657
+
the strictest one wins, and when nginx or PHP-FPM rejects a request the user sees a generic 413 / network error
658
+
rather than the friendly Symfony validator message. Keep them ordered as: **PHP-FPM ≥ nginx ≥ app**.
659
+
660
+
| Layer | Knob | Where it lives |
661
+
|---|---|---|
662
+
| App (Symfony validator + Admin UI) |`MEDIA_MAX_UPLOAD_SIZE_MB` (megabytes, integer) |`.env` (committed default `200`) — override in `.env.local` for development or in the deployment environment for production |
663
+
| Nginx request body |`NGINX_MAX_BODY_SIZE` (nginx size string, e.g. `200m`) |`docker-compose.yml` and `docker-compose.server.yml`; image default is `200m` (set in `infrastructure/nginx/Dockerfile`) |
664
+
| PHP-FPM upload + post body |`PHP_UPLOAD_MAX_FILESIZE`, `PHP_POST_MAX_SIZE` (PHP size strings, e.g. `200M`) | Operator-managed env vars on the php-fpm container (supported by the `itkdev/php8.4-fpm` base image). Not set in this repo by default — base image defaults apply unless overridden |
665
+
666
+
The app reads `MEDIA_MAX_UPLOAD_SIZE_MB` per-request, so a deploy / php-fpm worker reload is enough to pick up
667
+
changes; no validator cache clear is needed.
668
+
644
669
### Other configuration options
645
670
646
671
- See `docs/configuration/openid-connect.md` for configuration of OpenID Connect.
0 commit comments