claudius-chat-widget
    Preparing search index...

    Interface ChatAttachment

    A file (image or PDF) attached to a user message.

    Bytes travel inline as base64 data until the worker stores them (R2 backend), after which the widget keeps only the storage key and a signed preview url. Persisted history never includes data; an attachment with neither data nor key is shown by name only and described to the model as no longer available.

    interface ChatAttachment {
        data?: string;
        expiresAt?: string;
        id: string;
        key?: string;
        mediaType: string;
        name: string;
        size: number;
        url?: string;
    }
    Index

    Properties

    data?: string

    Base64-encoded bytes without a data: prefix.

    expiresAt?: string

    ISO 8601 timestamp after which the stored file and its url expire.

    id: string

    Client-generated id, unique within the conversation.

    key?: string

    Worker storage key, present once the worker's R2 backend stored the file.

    mediaType: string

    MIME type, e.g. "image/png" or "application/pdf".

    name: string

    Original filename.

    size: number

    Size in bytes.

    url?: string

    Signed preview/download URL for a stored file, valid until ChatAttachment.expiresAt.