Skip to content

feat(upload): allow PDF attachments - #708

Merged
alari76 merged 1 commit into
mainfrom
feat/pdf-attachments
Oct 2, 2026
Merged

alari76 merged 1 commit into
mainfrom
feat/pdf-attachments

Conversation

@alari76

@alari76 alari76 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Server: .pdf → application/pdf added to the upload allowlist; PDFs go through the same magic-byte (file-type) signature check as images, so a disguised file is rejected.
  • Composer: the file picker's accept list, the attach-button tooltip and the drop-zone label now include PDFs.
  • Docs: POST /api/upload in API-REFERENCE.md.

No harness changes needed: Claude and Grok get the path and read the file with their own tools, Codex gets a path reference for non-images, and OpenCode already sends PDFs as data-URL file parts.

Test plan

  • New tests: a valid PDF is accepted; a .pdf containing PNG bytes is rejected (signature mismatch)
  • server/upload-routes.test.ts passes (18/18)

🤖 Generated with Claude Code

Add .pdf (application/pdf) to the upload allowlist, with the same magic-byte
signature check used for images. The composer's file picker, attach-button
title and drop zone now advertise PDFs. Every harness already handles
non-image attachments by path (and OpenCode sends PDFs as file parts).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alari76
alari76 merged commit 2a65723 into main Oct 2, 2026
2 checks passed
@alari76
alari76 deleted the feat/pdf-attachments branch October 2, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant