Skip to content

docs(uploads): document lvt-upload-with opt-in field marking - #120

Merged
adnaan merged 1 commit into
mainfrom
feat/upload-opt-in-fields
Jul 19, 2026
Merged

docs(uploads): document lvt-upload-with opt-in field marking#120
adnaan merged 1 commit into
mainfrom
feat/upload-opt-in-fields

Conversation

@adnaan

@adnaan adnaan commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Docs half of livetemplate/livetemplate#452. Pairs with livetemplate/client#150.

What changed

  • content/reference/uploads.md — new Sending form fields with an upload section covering the marking contract plus the three rules that sit on top of it: part ordering, name-scoped/form-scoped marking, and the file winning a name collision. Also documents the multi-file contract (fields ride along with every request).
  • content/reference/client-attributes.mdlvt-upload-with added to the Upload Attributes table.
  • examples/upload-modes/upload-modes.tmpl — the proxied demo's record id is now marked.

The example edit is load-bearing

Worth flagging because it looks cosmetic. upload-modes relied on the old serialize-everything default to deliver record_id to OnUpload. Under opt-in, an unmarked field silently stops arriving — the demo still compiles, serves, and renders, it just routes every upload to the fallback record.

Verified by removing the marker and watching the e2e fail exactly that way:

proxied result = "stored: /files/proxied/unfiled/testdata.png",
  want the ref routed under record id invoice-42

Marker restored, all 4 upload-modes e2e tests pass (WS-up and WS-disabled paths) against a locally-built client#150 bundle.

Merge order

Either order is safe. The marker is an inert unknown attribute to the currently-published client, which still delivers record_id via the old denylist — so this doesn't need the client release to land first. Note the upload-modes e2e is env-gated (docs#67) and so doesn't run in CI either way.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ui2cwpeGkrUfRt8rh2FgGG

Form fields now travel with a Proxied upload only when marked
lvt-upload-with (client b88d492). Document the contract in the uploads
reference, add the attribute to the client-attributes table, and mark the
record id in the upload-modes example.

The example edit is load-bearing, not polish: it relied on the old
serialize-everything default to deliver record_id, so without the marker
the proxied demo silently routes every upload to "unfiled" — verified by
watching upload-modes_test.go fail that way before the marker was added
back.

Refs livetemplate/livetemplate#452

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ui2cwpeGkrUfRt8rh2FgGG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant