Skip to main content
ctx.store({ bytes, contentType }) stores bytes as a file at the frame’s label and returns its File point. Keep the point in a t.file field in the same transaction; a file no committed fact keeps is retired by the host.
bytes is a Uint8Array, a Blob or a string (stored as UTF-8). Pass sha256 (base64) to have the host check the bytes against a digest you already hold. The host seals every file. A protected file’s key also depends on its label’s erasure units. Pass { label } to choose the file’s place. A label above the frame’s commit label is a blind write. To store a copy for a lower audience, use ctx.store(input, { label, release }) and list the declared release in the function’s releases. The host reads a member release’s member from the file’s label. The file carries the units of the values the transaction opened, less what its table’s survives declaration covers. A sealed archive retains a File’s original ID, generation, wrapped key and absolute expiry. The destination verifies the File’s label and protection before it can publish a referring row. An authorized clear-copy release can disclose the bytes for import as a new File. In a test, k.seed(sys.files, [{ bytes }]) stores a file as the installation on the test kernel.