Sanity Library Reference Docs
    Preparing search index...

    Interface UploadClientConfig

    interface UploadClientConfig {
        contentType?: string;
        creditLine?: string;
        description?: string;
        extract?: AssetMetadataType[];
        filename?: string;
        label?: string;
        preserveFilename?: boolean;
        source?: { id: string; name: string; url?: string };
        tag?: string;
        timeout?: number;
        title?: string;
    }
    Index

    Properties

    contentType?: string

    Mime type of the file

    creditLine?: string

    The credit to person(s) and/or organization(s) required by the supplier of the asset to be used when published

    description?: string

    Optional description for the asset

    extract?: AssetMetadataType[]

    Array of metadata parts to extract from asset

    filename?: string

    Filename for this file (optional)

    label?: string

    Optional freeform label for the asset. Generally not used.

    preserveFilename?: boolean

    Whether or not to preserve the original filename (default: true)

    source?: { id: string; name: string; url?: string }

    Source data (when the asset is from an external service)

    Type declaration

    • id: string

      The (u)id of the asset within the source, i.e. 'i-f323r1E'

    • name: string

      The name of the source, i.e. 'unsplash'

    • Optionalurl?: string

      A url to where to find the asset, or get more info about it in the source

    tag?: string

    Optional request tag for the upload

    timeout?: number

    Milliseconds to wait before timing the request out

    title?: string

    Optional title for the asset