View as Markdown

API reference: @salmonui/chat/conversation

ConversationAttachmentinterface

import type { ConversationAttachment } from '@salmonui/chat/conversation';
interface ConversationAttachment {
    readonly id: string;
    readonly name: string;
    readonly size?: number;
    readonly type?: string;
    readonly url?: string;
    readonly file?: File;
}

A file attached to a message or pending in the composer.

ConversationAttachment members (6)
NameSignatureDescription
idreadonly id: string;

Stable id (the upload transport's reference, or a generated id).

namereadonly name: string;
sizeoptionalreadonly size?: number;

Size in bytes.

typeoptionalreadonly type?: string;

MIME type.

urloptionalreadonly url?: string;

Where the stored file can be opened (from the upload transport).

fileoptionalreadonly file?: File;

The picked file, when no upload transport stored it.