diff --git a/apps/admin-panel/nginx.conf b/apps/admin-panel/nginx.conf index c7c4592a..554a8dc4 100644 --- a/apps/admin-panel/nginx.conf +++ b/apps/admin-panel/nginx.conf @@ -5,6 +5,16 @@ server { root /usr/share/nginx/html; index index.html; + # Uploads are capped at 15 MB by the API; nginx's 1 MB default would reject + # any real photo with a bare 413 before the request ever reached it. + client_max_body_size 20m; + + # The first request for a given /api/img width renders it on demand; an + # 8000px source can take a while on a small VPS, and nginx's 60s default + # turned that into a 504 — a card thumbnail that stayed broken until the + # variant finished, while the original (/uploads) opened fine. + proxy_read_timeout 180s; + # Docker's embedded DNS. Without re-resolving at request time, nginx caches the # api container's IP from startup and keeps returning 502 ("no live upstreams") # after the api container restarts with a new IP. diff --git a/apps/admin-panel/src/components/upload/GalleryUploadInput.vue b/apps/admin-panel/src/components/upload/GalleryUploadInput.vue index 931bea13..3f62eb0b 100644 --- a/apps/admin-panel/src/components/upload/GalleryUploadInput.vue +++ b/apps/admin-panel/src/components/upload/GalleryUploadInput.vue @@ -7,7 +7,7 @@ -->