[PR #12176] [MERGED] Support skipping ingestion and downloading files as attachments #45907

Closed
opened 2026-04-29 20:29:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 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: devHead: feat/file-upload-download-options


📝 Commits (1)

  • 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

image


🔄 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 ![image](https://github.com/user-attachments/assets/1be10591-99cf-4d01-b473-7f0df26cdba4) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-29 20:29:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#45907