• Mahmoud Aglan's avatar
    fix(uploads): a temporary file that is gone is a sentence, not a 500 · d396f784
    Mahmoud Aglan authored
    Error eab81218-6482-47eb-9d09-aa54259069aa: an expense receipt, from an
    iPhone, at 16:22 today. League\Flysystem\UnableToRetrieveMetadata —
    "Unable to retrieve the file_size for livewire-tmp/Vy05fpe….jpg".
    
    Livewire uploads in two steps: the file lands in livewire-tmp on its own
    request, and the component reads it on a later one. Between those two the
    file can be gone — every push redeploys the container and livewire-tmp is
    not persistent, Livewire's own cleanup removes stale files, and a phone
    happily resends a form after the app has restarted. The first thing to
    touch the file is validation, because `max:5120` calls getSize(), so the
    receptionist standing at the desk with a receipt got an error page and a
    support code instead of a form.
    
    The file being gone is not exceptional, it is Tuesday. ChecksTemporaryUploads
    asks whether the pending upload still exists (treating an unreachable disk
    as gone rather than letting a storage exception reach the browser), clears
    the dead handle so the next attempt starts clean, and puts one Arabic
    sentence on the field: اختر الملف مرة أخرى وأعد الرفع.
    
    Applied to every component that reads an upload, not just the one that was
    reported — expense receipt and expense form, the three portal uploads
    (payment proof, documents, requests), branding images, the page builder,
    the gallery, the document wizard, the event wizard's cover and gallery
    photos, and the participant import.
    
    Also pins what the group roster already does with combined invoices, since
    it was worth proving rather than assuming: participants 219 and 97 each
    paid part of the federation card on an invoice shared with a kit, typed as
    free text, and the roster allocates the payment across the lines and shows
    the card's share against the price for that member's tier — 2,500 of 8,000
    and 2,000 of 6,000, both labelled أقساط.
    
    Full suite 325 tests on SQLite and on the restored tenant, no failures.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    d396f784
Name
Last commit
Last update
Screenshots Loading commit data...
app Loading commit data...
bootstrap Loading commit data...
config Loading commit data...
database Loading commit data...
docker Loading commit data...
docs Loading commit data...
docs-site Loading commit data...
flutter_shell Loading commit data...
gap-filling-plans Loading commit data...
lang Loading commit data...
marketing-site Loading commit data...
plans Loading commit data...
public Loading commit data...
reference/oc-sport Loading commit data...
resources Loading commit data...
routes Loading commit data...
scripts Loading commit data...
storage Loading commit data...
tests Loading commit data...
.dockerignore Loading commit data...
.editorconfig Loading commit data...
.env.example Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.npmrc Loading commit data...
Beanding Guide.txt Loading commit data...
CLAUDE.md Loading commit data...
Dockerfile Loading commit data...
README.md Loading commit data...
artisan Loading commit data...
captain-definition Loading commit data...
composer.json Loading commit data...
composer.lock Loading commit data...
deploy.sh Loading commit data...
elcaptain-sportsonly-db.md Loading commit data...
one-click-app.yml Loading commit data...
package-lock.json Loading commit data...
package.json Loading commit data...
phpunit.xml Loading commit data...
system info.txt Loading commit data...
vite.config.js Loading commit data...
نادى الشيخ زايد كشف بيانات اللاعبين (2).html Loading commit data...