Portal Community
Why composites exist: "upload a file and make sure it's durably pinned" or "confirm this content is still intact" are common workflow needs that would otherwise take two or three chained nodes (content/add + pin/add or cluster/add, or content/cat + a manual hash check). The storage resource packages each pattern as a single node call.

uploadAndPin

Binary input. Adds content, then pins it — via the Cluster (replicated) when a Cluster connection is configured, otherwise via Kubo's own local pinset.

FieldTypeRequiredDefaultDescription
inputDataKeytextNodataKey in the upstream node's InputData holding the bytes to store.
dataModeselectNobase64base64 | text.
inlineContenttextNoInline content fallback.
fileNametextNofileFile name recorded on the multipart part.
baseUrltextConditionalRequired only when not using a Cluster connection (the Kubo-only path).
clusterBaseUrltextNoWhen set, content is added and pinned through the Cluster instead of Kubo directly.
clusterAuthMode / destinationCredentialIDConditionalRequired together when pinning via the Cluster with Basic auth.

Response: { cid, name, size, usedCluster, pinStatus }.

Step-by-step:
  1. Resolve the upstream binary content (same inputDataKey/inlineContent pattern as content/add).
  2. If clusterBaseUrl is set: call the Cluster's add-and-replicate-pin endpoint (equivalent to cluster/add).
  3. Otherwise: call Kubo's content/add with pin: true directly.
  4. Return a unified record regardless of which path was taken.

verifyIntegrity

Kubo-only (no Cluster connection needed). Re-fetches content at a CID and asks Kubo to recompute its CID, then compares the two — a tamper/corruption check without reimplementing hashing client-side.

FieldTypeRequiredDefaultDescription
cidtext✓ YesThe expected CID — also the path fetched to verify.
chunkertextNoChunker to use when recomputing — should match the original add for a meaningful comparison.
cidVersionintNoinferredCID version to recompute with. When unset, inferred from the expected CID's own encoding (0 for a Qm…-prefixed v0 CID, otherwise 1) so the comparison is apples-to-apples.

Missing cidCFG_MISSING_CID. Response: { matches, expectedCid, computedCid, size }.

Step-by-step:
  1. Fetch the content at cid via Kubo's cat endpoint.
  2. Re-add the fetched bytes with Kubo's only-hash flag (recompute the CID, no datastore write).
  3. Compare the recomputed CID against the expected cid string-for-string.
  4. matches: false is a legitimate result, not an execution error — it still routes to the success output port.
The CIDv1 inference fix: an earlier version of this operation always recomputed using CIDv0, which produced a false mismatch for any content that was originally added as CIDv1. The fix infers the version from the expected CID's own prefix by default — pass cidVersion explicitly only if you need to override that inference.