Extend `/docx` downloads to `/file` for arbitrary file types
From the PR description
Summary
This extends the existing /docx endpoint to allow for download of arbitrary files, not just DOCX. It consolidates the old /docx endpoint with a new /file endpoint and redirects the former there.
It's just a suggestion to allow other folks to extend it as we have.
Why / Motivation
Folks implementing in-browser editors and document viewers for the miscellaneous supported formats will want access to the raw file bytes as opposed to the results supplied by /display.
Changes
As above.
Tradeoffs & risks
The very minor trade-off is that folks who want to avoid the imperceptible redirect from /docx to /file will need to migrate. Then the /docx endpoint could be deprecated in favor of the more general /file.
How verified
We ran the test suite, which was unaffected by the changes.
Checklist
- Ran the relevant build/test command for the area changed.
- Reviewed
git diffand removed unrelated changes. - Updated docs / env examples if setup, config, or behavior changed.
- No secrets, API keys, real documents, or
.envfiles committed.
Our analysis
Generalize raw file-bytes endpoint, retire /docx — read the full analysis →
Think the analysis missed something the PR description covers?
Commits in this PR (2)
| SHA | Subject | Author | Date | |
|---|---|---|---|---|
a0dcc4e0 | add raw File bytes streaming to API | Drew Miller | 2026-08-07 | ↗ GitHub |
55afeef3 | consolidate file getter endpoints | Drew Miller | 2026-08-10 | ↗ GitHub |
Capture this PR into my fork
Download a Markdown prompt that tells Claude how to port every
commit in this PR into your working tree. Run it via
claude -p < capture-pull-304.md from
inside the repo you want the changes in.