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?
468
469
- TRACK_SCREEN_INFO: Should screen info be tracked (true|false)?
469
470
- TRACK_SCREEN_INFO_UPDATE_INTERVAL_SECONDS: How often (seconds) should the screen info be tracked from API requests?
471
+
- MEDIA_MAX_UPLOAD_SIZE_MB: Maximum allowed size (in megabytes, binary MiB) for media uploads. Enforced inside
472
+
`App\Controller\Api\MediaController` and exposed to the Admin via `/config/admin` so the dropzone size check and
473
+
the displayed "Max-size" label stay aligned. Must also be aligned with the nginx body-size limit and the PHP-FPM
474
+
upload/post limits — see [Configuring media upload size limits](#configuring-media-upload-size-limits) below.
475
+
476
+
**Default**: `200`.
477
+
478
+
Changes are picked up on the next request once PHP-FPM workers see the new env value (in production, restart the
479
+
php-fpm container or reload the workers). The admin UI re-fetches `/config/admin` on the next page load.
470
480
471
481
### Admin configuration
472
482
@@ -588,6 +598,21 @@ CLIENT_DEBUG=false
588
598
589
599
**Default**: Disabled.
590
600
601
+
### Configuring media upload size limits
602
+
603
+
The maximum size of an uploaded media file is enforced at three independent layers. They must be kept aligned —
604
+
the strictest one wins, and when nginx or PHP-FPM rejects a request the user sees a generic 413 / network error
605
+
rather than the friendly Symfony validator message. Keep them ordered as: **PHP-FPM ≥ nginx ≥ app**.
606
+
607
+
| Layer | Knob | Where it lives |
608
+
|---|---|---|
609
+
| 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 |
610
+
| 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`) |
611
+
| 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 |
612
+
613
+
The app reads `MEDIA_MAX_UPLOAD_SIZE_MB` per-request, so a deploy / php-fpm worker reload is enough to pick up
614
+
changes; no validator cache clear is needed.
615
+
591
616
### Other configuration options
592
617
593
618
- See `docs/configuration/openid-connect.md` for configuration of OpenID Connect.
0 commit comments