Using Prepared Uploads
SkillDev toolsManage prepared upload lifecycles. Use when code must collect, read, commit, or discard a FileUpload result.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Using Prepared Uploads skill
What this skill tells your AI
The instructions your AI receives, as published by rejot-dev/fragno in apps/backoffice/content/static/skills/using-prepared-uploads/SKILL.md and read by ahel’s review.
Treat every prepared upload as a lifecycle: collect one reference, consume it in the matching scope, then commit or discard it.
Collect
When composing generated Backoffice UI:
- Read
/static/skills/generating-backoffice-uis/SKILL.mdand its component catalog. - Set
FileUpload.scopeto{ kind: "current" }when the upload belongs to the workflow's current Backoffice context. The renderer resolves it to the authenticated org, project, or user scope. - Initialize the bound value to
nulland bindFileUpload.valuewith{ "$bindState": "/response/attachment" }. - Submit the response through one
WorkflowEventButton.
State receives one serializable prepared-upload reference. It contains no browser File, bytes,
base64, URL, or generated storage policy.
Consume
Read /static/codemode/providers/upload.d.ts before authoring lifecycle operations. Use the
submitted prepared-upload reference as the file input:
upload.readPrepared({ file, encoding: "utf8" })returns textual content astext.upload.readPrepared({ file, encoding: "bytes" })returns binary content asbytes; pass those bytes directly to binary consumers.- Use
encoding: "base64"only when the consumer requires base64 text; the result is returned asbase64, not raw bytes. upload.commitPrepared({ file })makes the file persistent.upload.discardPrepared({ file })deletes a temporary prepared upload.
Use the provider scoped to the reference: the current provider when the upload belongs to the
current workflow context, or the matching context.org(...), context.project(...), or
context.user(...) provider for an explicitly different scope.
Durable completion
Keep lifecycle provider calls inside step.do. A workflow that reads a temporary upload reaches
either commitPrepared or discardPrepared in a later durable step.
Complete when the event payload contains one prepared-upload reference, every upload call uses that exact reference in its matching scope, and the workflow reaches commit or discard.
Signals
- GitHub stars
- 61
- Forks
- 6
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
using-prepared-uploads- Source
- github.com/rejot-dev/fragno