Validate image uploads before they reach storage

recipe-box · Claude · branch feat/uploads · claude-opus-5 · cwd /home/user/code/recipe-box · id c2e15801-8717-5630-328c-2fc047726f7d · 2026-07-31 19:44 · 2 msgs · 23 tools · 1 min read · updated 5 weeks ago

Oversized and mistyped uploads were rejected only after being written.

tools: Read, Edit, Bash
← recipe-box Download .md
cd /home/user/code/recipe-box && claude --resume c2e15801-8717-5630-328c-2fc047726f7dResume may fail — session is older than Claude Code's ~30-day transcript retention window.
Tool calls
Edit Edit: 6 calls (54.5%) 6 Read Read: 3 calls (27.3%) 3 Bash Bash: 2 calls (18.2%) 2
Token usage12.9K total
Input10.8K
Cache creation0
Cache read0
Output2.1K
Cache hit ratio0%· cold cache

Oversized and mistyped uploads were rejected only after being written.

Conversation

Turn 1 — User

Someone uploaded a video and it was stored before anything complained.

Turn 2 — Assistant

Validation ran after the write. It now happens on the incoming stream: type is checked from the actual bytes rather than the declared name, and the read is capped so an oversized file is rejected before it is buffered.

The error names the limit and the detected type, since the previous message said only that the upload failed.

Turn 3 — User

What is the cap?

Turn 4 — Assistant

Configurable, defaulting to eight megabytes. The cap is enforced during the read, so an attempt to send more is cut off rather than measured after the fact.

Subjects

  • [[Web App]]
  • [[Validation]]

Keyboard shortcuts

⌘K / Ctrl+KOpen command palette
/Focus search
g hGo to home
g pGo to projects
g sGo to sessions
j / kNext / prev row (tables)
?Show this help
EscClose dialogs

Structured queries

Mix key:value filters with free text in the palette:

type:sessionOnly session pages
project:llm-wikiFilter by project name (substring)
model:claudeFilter by model name (substring)
date:>2026-03-01Sessions after a date
date:<2026-04-01Sessions before a date
tags:rustPages mentioning a tag/topic
sort:dateSort results by date (newest first)

Example: type:session project:llm-wiki date:>2026-04 sort:date