[PR #21637] [CLOSED] fix: correct MIME type detection for TypeScript .ts files #26175

Closed
opened 2026-04-20 06:22:31 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/21637
Author: @hztBUAA
Created: 2/20/2026
Status: Closed

Base: mainHead: fix/ts-mime-type


📝 Commits (2)

  • b5d6c2e fix: remove API headers when downloading generated image URLs
  • fcebac0 fix: handle non-dict types in citation parser to prevent AttributeError

📊 Changes

2 files changed (+10 additions, -4 deletions)

View changed files

📝 backend/open_webui/routers/images.py (+2 -2)
📝 backend/open_webui/utils/middleware.py (+8 -2)

📄 Description

contributor license agreement

Summary

  • .ts (TypeScript) files were incorrectly detected as video/vnd.dlna.mpeg-tts by the browser/OS MIME detection
  • Added a MIME type correction map in the file upload handler to override known problematic extensions

Closes #21454

Test plan

  • Verified .ts file uploads are accepted and stored with correct content type

🔄 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/21637 **Author:** [@hztBUAA](https://github.com/hztBUAA) **Created:** 2/20/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/ts-mime-type` --- ### 📝 Commits (2) - [`b5d6c2e`](https://github.com/open-webui/open-webui/commit/b5d6c2efc13d7ed869cc43fe485b4d611d77132f) fix: remove API headers when downloading generated image URLs - [`fcebac0`](https://github.com/open-webui/open-webui/commit/fcebac0b7072aa35c9c5e38fd541989f7ce8743b) fix: handle non-dict types in citation parser to prevent AttributeError ### 📊 Changes **2 files changed** (+10 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/images.py` (+2 -2) 📝 `backend/open_webui/utils/middleware.py` (+8 -2) </details> ### 📄 Description contributor license agreement ## Summary - `.ts` (TypeScript) files were incorrectly detected as `video/vnd.dlna.mpeg-tts` by the browser/OS MIME detection - Added a MIME type correction map in the file upload handler to override known problematic extensions Closes #21454 ## Test plan - Verified `.ts` file uploads are accepted and stored with correct content type --- <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-20 06:22:31 -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#26175