feat(upload): support Excel and Word file attachments — v0.50.61

Squash-merges PR #571 (rebased from contributor PR #566 by @renheqiang). Adds .xls/.xlsx/.doc/.docx to the file picker and MIME map. 1319 tests pass.
This commit is contained in:
nesquena-hermes
2026-04-15 22:43:31 -07:00
committed by GitHub
parent e4fec9e4e0
commit 360379136b
3 changed files with 12 additions and 2 deletions

View File

@@ -342,6 +342,7 @@ MAX_UPLOAD_BYTES = 20 * 1024 * 1024
# ── File type maps ───────────────────────────────────────────────────────────
IMAGE_EXTS = {".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".ico", ".bmp"}
MD_EXTS = {".md", ".markdown", ".mdown"}
OFFICE_EXTS = {".xls", ".xlsx", ".doc", ".docx"}
CODE_EXTS = {
".py",
".js",
@@ -380,6 +381,10 @@ MIME_MAP = {
".bmp": "image/bmp",
".pdf": "application/pdf",
".json": "application/json",
".xls": "application/vnd.ms-excel",
".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
".doc": "application/msword",
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
}
# ── Toolsets (from config.yaml or hardcoded default) ─────────────────────────