Files & attachments
Govern bytes without prescribing their meaning.
Read as Markdown ↗On this page
Upload then attach
files.upload transfers bounded bytes and verifies integrity. Append an attachment containing the returned file_id. The ledger contract controls attachment count, byte size and media types. JSON text remains ordinary record payload.
Upload then attach · Shell
op-sys files upload --ledger-id <ledger-id> --file ./document.pdf --media-type application/pdfRead availability explicitly
files.get reports availability. files.download reads authorized bytes; --output-file saves a fully verified download. Missing, partial and erased files are distinct states. references.resolve performs an authorized record lookup, not a cross-ledger permission grant.
Detailed contract and examples