Sanity Library Reference Docs
    Preparing search index...

    Interface MediaLibraryAssetDocument

    The document returned by the Media Library upload endpoint (POST /media-libraries/:id/upload).

    This is not the same shape as SanityAssetDocument / SanityImageAssetDocument: a Media Library asset is a sanity.asset document that tracks one or more uploaded versions, each pointing at its own underlying Content Lake asset document via currentVersion/versions.

    Modelled directly on an observed API response. Fields whose full shape has not been confirmed (parent, rootDirectory, aspects) are typed loosely on purpose - widen them once their shape is confirmed.

    interface MediaLibraryAssetDocument {
        _id: string;
        _type: "sanity.asset";
        aspects?: Record<string, any>;
        assetType: string;
        cdnAccessPolicy?: string;
        currentVersion: SanityReference;
        parent?: SanityReference | null;
        rootDirectory?: any;
        title?: string;
        versions: MediaLibraryAssetVersion[];
    }
    Index

    Properties

    _id: string
    _type: "sanity.asset"
    aspects?: Record<string, any>
    assetType: string
    cdnAccessPolicy?: string
    currentVersion: SanityReference
    parent?: SanityReference | null
    rootDirectory?: any
    title?: string