Sanity Library Reference Docs
    Preparing search index...

    Interface FileOptions

    BaseOptions applies to all type options.

    It can be extended by interface declaration merging in plugins to provide generic options to all types and fields.

    interface FileOptions {
        accept?: string;
        canvasApp?: CanvasAppOptions;
        collapsed?: boolean;
        collapsible?: boolean;
        columns?: number;
        disableNew?: boolean;
        mediaLibrary?: MediaLibraryOptions;
        modal?: { type?: "popover" | "dialog"; width?: number | "auto" | number[] };
        sanityCreate?: SanityCreateOptions;
        sources?: AssetSource[];
        storeOriginalFilename?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    accept?: string
    canvasApp?: CanvasAppOptions
    collapsed?: boolean
    collapsible?: boolean
    columns?: number
    disableNew?: boolean

    When set to true, hides the upload UI, only allowing selection of existing assets from the media library. Useful for centralized asset management workflows where ad-hoc uploads should be prevented.

    mediaLibrary?: MediaLibraryOptions
    modal?: { type?: "popover" | "dialog"; width?: number | "auto" | number[] }
    sanityCreate?: SanityCreateOptions
    sources?: AssetSource[]
    storeOriginalFilename?: boolean