mirror of
https://github.com/myronblair/novacpx
synced 2026-07-28 13:14:33 -05:00
Compare commits
6 Commits
8adedb9759
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| be3dbec68a | |||
| a299447c9c | |||
| 25233b9496 | |||
| 35aa202a4f | |||
| 2beffd810d | |||
| 3d2c7c25c2 |
@@ -47,6 +47,13 @@ http {
|
|||||||
fastcgi_param SCRIPT_FILENAME /srv/novacpx/public/api/index.php;
|
fastcgi_param SCRIPT_FILENAME /srv/novacpx/public/api/index.php;
|
||||||
fastcgi_param SERVER_PORT 8882;
|
fastcgi_param SERVER_PORT 8882;
|
||||||
fastcgi_read_timeout 1800;
|
fastcgi_read_timeout 1800;
|
||||||
|
fastcgi_send_timeout 1800;
|
||||||
|
client_body_timeout 1800;
|
||||||
|
send_timeout 1800;
|
||||||
|
# Stream the request body straight to PHP-FPM instead of nginx buffering
|
||||||
|
# the whole thing to a temp file first and then reading it back — cuts a
|
||||||
|
# full extra disk read+write pass for large uploads (ISOs, installers).
|
||||||
|
fastcgi_request_buffering off;
|
||||||
fastcgi_param PHP_VALUE "upload_max_filesize=20G
|
fastcgi_param PHP_VALUE "upload_max_filesize=20G
|
||||||
post_max_size=20G
|
post_max_size=20G
|
||||||
max_execution_time=1800
|
max_execution_time=1800
|
||||||
|
|||||||
@@ -4861,6 +4861,18 @@ window.fmSubmitUpload = () => {
|
|||||||
if (pctEl) pctEl.textContent = pct + '%';
|
if (pctEl) pctEl.textContent = pct + '%';
|
||||||
if (bytesEl) bytesEl.textContent = fmFormatBytes(e.loaded) + ' / ' + fmFormatBytes(e.total);
|
if (bytesEl) bytesEl.textContent = fmFormatBytes(e.loaded) + ' / ' + fmFormatBytes(e.total);
|
||||||
});
|
});
|
||||||
|
// Reaching 100% here only means the browser finished SENDING the bytes — the
|
||||||
|
// server (nginx + PHP) still has to receive/move the file, which for large
|
||||||
|
// files can take a genuine extra stretch with no further upload events. Make
|
||||||
|
// that explicit so it doesn't look frozen.
|
||||||
|
xhr.upload.addEventListener('load', () => {
|
||||||
|
const pctEl = document.getElementById('fm-upload-pct');
|
||||||
|
const bytesEl = document.getElementById('fm-upload-bytes');
|
||||||
|
const bar = document.getElementById('fm-upload-bar');
|
||||||
|
if (bar) bar.style.background = '#f59e0b';
|
||||||
|
if (pctEl) pctEl.textContent = 'Finishing up…';
|
||||||
|
if (bytesEl) bytesEl.textContent = 'Upload sent — waiting for the server to finish saving the file. Large files can take a few extra minutes here. Do not close or reload this page.';
|
||||||
|
});
|
||||||
|
|
||||||
xhr.onload = () => {
|
xhr.onload = () => {
|
||||||
let res = null;
|
let res = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user