Yak Docs
Customization

Attachments

Attachments let end users add files — images, PDFs, and text documents — to their chat messages, so the assistant can see and reason over what they share. A user might drop in a screenshot of an error, a PDF invoice, or a photo of their living room, then ask a question about it.

There's nothing to integrate on the host page: the widget renders the attach button and a drag-and-drop zone, uploads files to Yak's private CDN, and passes them to the assistant alongside the message. You control whether it's available per application from the dashboard.

How it works

  1. The user adds files via the paperclip button in the input bar or by dragging and dropping them onto the chat panel.
  2. The widget uploads each file to Yak's private CDN through a short-lived signed URL, showing an upload progress indicator in a thumbnail strip.
  3. On send, the ready files are attached to the message as file parts, and the assistant receives them along with the user's text.

Images and PDFs can be previewed in a side panel; other files show a file thumbnail.

Enabling it

In the dashboard, open your application's Behavior settings and toggle Enable attachments. Attachments are on by default, including for applications created before this setting existed.

When the toggle is off:

  • The widget hides the attach button and the drag-and-drop zone, so users have no way to add files.
  • The upload endpoint (/api/attachments/presign) returns a 403, so uploads are rejected server-side even if a client tries to bypass the UI.

Attachments apply to chat mode — disabling chat also disables uploads.

The toggle is a server-side gate the operator owns. It is not overridable from the host page's widget config, so a per-page integration can't re-enable uploads you've turned off.

Limits

A few limits keep uploads bounded, enforced server-side regardless of the toggle:

  • File types — images (PNG, JPEG, WebP, GIF), PDFs, and plain-text/Markdown files.
  • File size — up to 25 MB per file.
  • Retention — uploaded files are stored on Yak's private CDN, served only through signed CloudFront access, and automatically deleted after 7 days.

Privacy. Files a user uploads are stored on Yak's private CDN and passed to the model to answer the user's request. Don't enable attachments on applications where end users might share data you don't want sent to the model or retained for the upload window.

  • Image generation builds on attachments — users upload a photo and the assistant composites your products into the scene.

On this page