a805e03 Feat: Add optional ingest_file and as_attachment params to upload and download endpoints
📊 Changes
1 file changed (+40 additions, -37 deletions)
View changed files
📝backend/open_webui/routers/files.py (+40 -37)
📄 Description
Target branch: This pull request targets the dev branch.
Description: Adds two new query parameters to improve flexibility of file handling endpoints in routers/files.py.
Changelog: Added an entry following Keep a Changelog format.
Testing: Manually tested with files and query combinations.
Code review: Self-reviewed for correctness and clarity.
Prefix:feat
Changelog Entry
Description
Adds two new query parameters to file upload and download endpoints to provide better control when using files in LLM-driven flows or pipelines.
Added
ingest_file (bool) to the POST /files endpoint — allows skipping ingestion and only storing the file. Defaults to True for backward compatibility.
as_attachment (bool) to GET /files/{id}/content — allows returning file as download attachment when set to True.
Additional Information
These changes make it easier to programmatically generate and retrieve files in pipeline workflows.
Example: An LLM creates a .txt file via /files?ingest_file=false and then returns a download link using /files/{id}/content?as_attachment=true.
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/12176
**Author:** [@JunaidPinjari](https://github.com/JunaidPinjari)
**Created:** 3/29/2025
**Status:** ✅ Merged
**Merged:** 3/29/2025
**Merged by:** [@tjbck](https://github.com/tjbck)
**Base:** `dev` ← **Head:** `feat/file-upload-download-options`
---
### 📝 Commits (1)
- [`a805e03`](https://github.com/open-webui/open-webui/commit/a805e033a526fa559237d827e44c91511c6bb3c6) Feat: Add optional ingest_file and as_attachment params to upload and download endpoints
### 📊 Changes
**1 file changed** (+40 additions, -37 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/routers/files.py` (+40 -37)
</details>
### 📄 Description
- [x] **Target branch:** This pull request targets the `dev` branch.
- [x] **Description:** Adds two new query parameters to improve flexibility of file handling endpoints in routers/files.py.
- [x] **Changelog:** Added an entry following Keep a Changelog format.
- [x] **Testing:** Manually tested with files and query combinations.
- [x] **Code review:** Self-reviewed for correctness and clarity.
- [x] **Prefix:** `feat`
---
# Changelog Entry
### Description
Adds two new query parameters to file upload and download endpoints to provide better control when using files in LLM-driven flows or pipelines.
### Added
- `ingest_file` (bool) to the `POST /files` endpoint — allows skipping ingestion and only storing the file. Defaults to `True` for backward compatibility.
- `as_attachment` (bool) to `GET /files/{id}/content` — allows returning file as download attachment when set to `True`.
---
### Additional Information
- These changes make it easier to programmatically generate and retrieve files in pipeline workflows.
- Example: An LLM creates a `.txt` file via `/files?ingest_file=false` and then returns a download link using `/files/{id}/content?as_attachment=true`.
---
### Screenshots or Videos

---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/12176
Author: @JunaidPinjari
Created: 3/29/2025
Status: ✅ Merged
Merged: 3/29/2025
Merged by: @tjbck
Base:
dev← Head:feat/file-upload-download-options📝 Commits (1)
a805e03Feat: Add optional ingest_file and as_attachment params to upload and download endpoints📊 Changes
1 file changed (+40 additions, -37 deletions)
View changed files
📝
backend/open_webui/routers/files.py(+40 -37)📄 Description
devbranch.featChangelog Entry
Description
Adds two new query parameters to file upload and download endpoints to provide better control when using files in LLM-driven flows or pipelines.
Added
ingest_file(bool) to thePOST /filesendpoint — allows skipping ingestion and only storing the file. Defaults toTruefor backward compatibility.as_attachment(bool) toGET /files/{id}/content— allows returning file as download attachment when set toTrue.Additional Information
.txtfile via/files?ingest_file=falseand then returns a download link using/files/{id}/content?as_attachment=true.Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.