[PR #7828] [MERGED] fix: use WEBUI_API_BASE_URL for file download links in Citations #37745

Closed
opened 2026-04-25 11:04:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/7828
Author: @juananpe
Created: 12/13/2024
Status: Merged
Merged: 12/16/2024
Merged by: @tjbck

Base: devHead: fixdownloadcitations


📝 Commits (1)

  • 6f3ab59 fix: use WEBUI_API_BASE_URL for file download links in Citations

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 src/lib/components/chat/Messages/CitationsModal.svelte (+2 -1)

📄 Description

Pull Request Checklist

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:

Changelog Entry

Description

When clicking on file links in the Citations component, the requests were being sent to the frontend server port (default: 5173) instead of the backend API port (default: 8080), resulting in 404 errors (in dev mode).

This PR fixes the issue by using the WEBUI_API_BASE_URL constant for constructing the file download URLs in the Citations component.

Changes

  • Updated the file download URL construction in CitationsModal.svelte to use WEBUI_API_BASE_URL

Testing

  1. Upload a file that can be referenced in chat (e.g., a PDF or DOCX)
  2. Ask a question about the file content
  3. Click on the source link in the Citations component
  4. Verify that the file downloads correctly instead of getting a 404 error

🔄 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/7828 **Author:** [@juananpe](https://github.com/juananpe) **Created:** 12/13/2024 **Status:** ✅ Merged **Merged:** 12/16/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `fixdownloadcitations` --- ### 📝 Commits (1) - [`6f3ab59`](https://github.com/open-webui/open-webui/commit/6f3ab5917d8650477d4cb07c5fd39d1e7dfa84dd) fix: use WEBUI_API_BASE_URL for file download links in Citations ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Messages/CitationsModal.svelte` (+2 -1) </details> ### 📄 Description # Pull Request Checklist - [x] **Target branch:** Please verify that the pull request targets the `dev` branch. - [x] **Description:** Provide a concise description of the changes made in this pull request. - [x] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following: # Changelog Entry ## Description When clicking on file links in the Citations component, the requests were being sent to the frontend server port (default: 5173) instead of the backend API port (default: 8080), resulting in 404 errors (in dev mode). This PR fixes the issue by using the `WEBUI_API_BASE_URL` constant for constructing the file download URLs in the Citations component. ## Changes - Updated the file download URL construction in CitationsModal.svelte to use WEBUI_API_BASE_URL ## Testing 1. Upload a file that can be referenced in chat (e.g., a PDF or DOCX) 2. Ask a question about the file content 3. Click on the source link in the Citations component 4. Verify that the file downloads correctly instead of getting a 404 error --- <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-25 11:04:06 -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#37745