Skip to main content

Assets and media

Assets are ordinary Vox entities with binary content. An image, video or document can therefore have the same metadata, relations, ownership, permissions, history and editorial workflows as other domain data.

Vox does not prescribe one universal asset class. An application defines the asset types its domain needs and can add fields such as alt text, copyright, dimensions, duration or rendition state:

public interface IMedia : IVoxAsset
{
}

public class Image : IMedia
{
// IVoxAsset and IVoxEntity properties omitted.
public string? AltText { get; set; }
public string? Copyright { get; set; }
}

public class Product : IVoxEntity
{
public List<VoxReference<IMedia>> Media { get; set; } = [];
}

A relation may target a concrete asset type or an interface shared by several types. Products can consequently refer to images and video through one media relation without giving up the concrete metadata of either asset.

Metadata and content​

The entity is the authoritative metadata record. Binary content is stored through a separate content-store abstraction and streamed with range support. Vox includes a disk-backed implementation, while an application can connect an object store or external DAM without changing the entity and relation model.

Uploading an asset creates its metadata through the asset type's normal create action and stores the content as one operation from the client's perspective. Deleting or purging an asset coordinates removal of its managed content with the entity lifecycle.

Admin UI​

The generic Admin UI discovers asset types, accepted content types and create-action fields from model metadata. It can present assets as a gallery and use a referenced asset as the image for another entity's card or list entry.

Folders, tags and collections are not special asset concepts. When a solution needs them, they can be modelled as ordinary entities, properties and relations. This keeps the asset model aligned with the rest of the domain rather than embedding one DAM taxonomy into Vox.

See Entities and relations, Editor metadata and selections and History and audit.