fix: File Manager upload had no size limit for large files and no progress feedback

nginx-panel.conf: added client_max_body_size 20g at the http level (this nginx instance only serves the NovaCPX panel, isolated from the system nginx), and scoped generous PHP upload limits (upload_max_filesize/post_max_size 20G, execution/input time 1800s) to just the admin panels /api/ location via fastcgi_param PHP_VALUE - this avoids touching the shared php8.3-fpm www pool config used by other sites.

admin.js: rewrote fmSubmitUpload from fetch() (no progress support, and would throw uncaught on a non-JSON error body like an nginx 413 page) to XMLHttpRequest with a real progress bar (percent + bytes transferred) that stays visible for the whole transfer instead of the dialog closing immediately on click.
This commit is contained in:
NovaCPX Admin
2026-07-15 14:33:36 -05:00
parent 14cb285209
commit 827a4e8297
2 changed files with 80 additions and 10 deletions
+8 -1
View File
@@ -14,6 +14,9 @@ http {
sendfile on;
gzip on;
# Large uploads via the admin File Manager (e.g. ISOs, installers) can be multi-GB.
client_max_body_size 20g;
# ── Admin Panel (8882) ─────────────────────────────────────────────────────
server {
listen 8882 ssl;
@@ -43,7 +46,11 @@ http {
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME /srv/novacpx/public/api/index.php;
fastcgi_param SERVER_PORT 8882;
fastcgi_read_timeout 300;
fastcgi_read_timeout 1800;
fastcgi_param PHP_VALUE "upload_max_filesize=20G
post_max_size=20G
max_execution_time=1800
max_input_time=1800";
}
}