Feature/no original fallback #158

Merged
cameron merged 2 commits from feature/no-original-fallback into master 2026-10-04 00:50:15 +00:00
Owner

fixes a fallback behavior where the server serves the full size image if there's an issue with the thumbnail

fixes a fallback behavior where the server serves the full size image if there's an issue with the thumbnail
cameron added 2 commits 2026-10-04 00:49:37 +00:00
A thumb miss (no thumb on disk, or an `.unsupported` sentinel) fell
through to NamedFile on the original. For a 12432x3504 panorama that
decodes to 174MB, past Android's 100MB draw limit, and crashed the
FileViewer app natively on the Memories tab. Still-image thumb misses
now serve the 2048px large preview, or 404 if even that can't be made.

Large/xlarge generation wrote to a shared `<dest>.jpg.tmp`, so two
concurrent requests for the same file (common: tile remounts) raced and
the loser's rename failed with os error 2, falling back to the original.
Generation now goes through a per-call tempfile, and a failed request
still serves a preview a concurrent request produced.

Large and xlarge branches are folded into one `serve_preview` helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cameron merged commit c256829615 into master 2026-10-04 00:50:15 +00:00
cameron deleted branch feature/no-original-fallback 2026-10-04 00:50:15 +00:00
Sign in to join this conversation.