Sanity · Arazzo Workflow
Sanity Upload Asset and Reference
Version 1.0.0
Upload an image asset, then create a document that references it.
View Spec
View on GitHub
Headless CMSContent ManagementGROQReal-TimeStructured ContentDeveloper PlatformArazzoWorkflows
Provider
Workflows
upload-asset-and-reference
Upload an image asset and wire it into a new document via a reference.
Uploads an image to the dataset, reads back the asset document id, and creates a document that references the asset through a standard Sanity image field.
1
uploadAsset
uploadImageAsset
Upload the binary image to the Content Lake and capture the asset document id and public url.
2
referenceAsset
mutateDocuments
Create a document with an image field whose asset reference points at the uploaded asset id.