feat(uploads): one 150 MB ceiling, agreed on by every layer that can refuse
A file crossing this system passes four size checks and they disagreed:
the component's rules said 5 MB, Livewire's undeclared default said 12,
PHP said 20, nginx said 25. Whichever was smallest won, with a message
written by whoever owned that layer — and nginx's refusal is a 413 error
page, not something a receptionist can act on.
config/uploads.php holds the number now, and the four layers are set from
it in the right order: nginx (160M) is the most generous so it never
refuses first, then post_max_size (160M) above upload_max_filesize (150M)
so a file at the limit is rejected as a file rather than as a malformed
request, then Livewire's temporary-upload rule, then the component. The
size named in each Arabic error message is interpolated from the same
config instead of retyped, because the old messages said "5 ميجابايت"
while the rule said something else.
Time limits went with it: max_input_time is what cuts off a body still
arriving, and 150 MB over Egyptian mobile data is minutes, so it and
nginx's client_body_timeout go to 300s and Livewire's max_upload_time to
30 minutes. Pictures keep their own small ceilings — a logo is carried on
every page load.
And the settlement worklist stops treating the running month as a problem.
Late now means a month that has ENDED and was not collected — read from
the month the invoice names, not from its due date — because a club
collects all month and does not consider a player a problem on the 9th.
A card being paid on an agreed plan whose next instalment has not come due
is not an anomaly either. Together: a player who owes only this month and
whose bundled product is bought or paid up to date does not appear at all,
which is the whole point of the screen. An unpaid bundled product goes
back to standing on its own, since that is exactly what it exists to find.
Verified on the restored tenant: 24 settlement cases including the new
month rule (last month unpaid flags, this month never does, whatever the
due date), full suite 334 tests on both connections.
Co-Authored-By:
Claude Opus 5 (1M context) <noreply@anthropic.com>
Showing
This diff is collapsed.
config/livewire.php
0 → 100644
This diff is collapsed.
config/uploads.php
0 → 100644
Please register or sign in to comment