OptionaldataBase64-encoded bytes without a data: prefix.
OptionalexpiresISO 8601 timestamp after which the stored file and its url expire.
Client-generated id, unique within the conversation.
OptionalkeyWorker storage key, present once the worker's R2 backend stored the file.
MIME type, e.g. "image/png" or "application/pdf".
Original filename.
Size in bytes.
OptionalurlSigned preview/download URL for a stored file, valid until ChatAttachment.expiresAt.
A file (image or PDF) attached to a user message.
Bytes travel inline as base64
datauntil the worker stores them (R2 backend), after which the widget keeps only the storagekeyand a signed previewurl. Persisted history never includesdata; an attachment with neitherdatanorkeyis shown by name only and described to the model as no longer available.