Upload files to include with chat messages — PDFs, CSVs, images, and text files up to 50 MB per file. Uploaded files are automatically processed and their content is injected into the agent's prompt.
!Attachments Panel
The agent will receive the extracted PDF text prepended to the user message and can answer questions about the document's content.
When you send a chat message with attachment_ids, each attachment is processed based on its type:
attachment_ids
| File Type | Processing | What the Agent Sees |
|-----------|-----------|-------------------|
| PDF (.pdf) | Text extracted via pypdf | Full text content prepended to prompt |
.pdf
pypdf
| Images (.png, .jpg, etc.) | Passed to SDK multimodal handler | Image sent as base64 to vision-capable LLMs |
.png
.jpg
| Text/Code (.txt, .py, .csv, etc.) | File contents read directly | Full file content prepended to prompt |
.txt
.py
.csv
!!! note "PDF Dependency"
PDF text extraction requires the pypdf package (pip install pypdf). If pypdf is not installed, a fallback message is shown instead of the extracted text. pypdf is included in PraisonAIUI's dependencies by default.
pip install pypdf
| Category | Extensions |
|----------|-----------|
| Documents | .pdf, .doc, .docx, .txt, .md |
.doc
.docx
.md
| Data | .csv, .json, .xml, .yaml, .yml |
.json
.xml
.yaml
.yml
| Images | .png, .jpg, .jpeg, .gif, .webp, .svg |
.jpeg
.gif
.webp
.svg
| Code | .py, .js, .ts, .html, .css |
.js
.ts
.html
.css
!!! warning "Blocked Types"
Executable files (.exe, .sh, .bat, .cmd, .com) are rejected by default.
.exe
.sh
.bat
.cmd
.com
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/chat/attachments | POST | Upload a file |
/api/chat/attachments
| /api/chat/attachments | GET | List attachments for a session |
| /api/chat/attachments/{id} | DELETE | Delete an attachment |
/api/chat/attachments/{id}
Response:
The attachment_ids array links uploaded files to the chat message. The server extracts content from each attachment and prepends it to the user's message before sending to the agent.
When sending messages via WebSocket, include attachment_ids in the message payload: