Pull requests / #2677
#2677 serve: PDF, Word, Excel and PowerPoint files in the chat page's attach button (POST /convert, MarkItDown, optional)
open · @page1 · 0 comentários · No GitHub
Setup & installServer & APIDocumentationWindowsLinux
Descrição
## Title
Issue: Resolves #2676
## Summary
The chat page's attach button (or a drop) also takes .pdf, .docx, .xlsx and .pptx. The server turns each into Markdown with MarkItDown, and the page attaches it like a text file. MarkItDown is optional and not installed by setup: without it nothing changes, and the button says how to install it.
## What changed
- `serve/server.py`: `convert_document()` and `POST /convert` (`{"name", "data": base64}` -> `{"text"}`). It answers only Strata's own page, like `/settings`, and reads only what it is sent. Limits: 50 MB per file, 1 MB of text. Errors: 400 for another file type or bad data, 501 when MarkItDown is missing (with the pip command for the running Python), 422 for a damaged or protected file.
- `serve/web/app.js`, `index.html`: the attach button accepts the four types and sends them to `/convert`.
- `docs/DETAILS.md`: a short section, with the install line for Windows and Linux. No OCR: a scanned PDF is refused with "No text found".
- `serve/test_server.py`: `ConvertDocuments` (other types refused, own page only, a PDF, a damaged file); the two that need MarkItDown skip without it.
## Extra Notes
Tests: all 43 `serve/test_*.py` suites pass without MarkItDown; the 4 `ConvertDocuments` tests pass with markitdown 0.1.8 (Windows 11, Python 3.13), where a 342 KB PDF became 26K characters in 0.9 s. Not tested on Linux.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
No site
Links install, modelos, releases.