[PR #21498] [CLOSED] fix: TypeScript .ts MIME type misdetection and image URL fetch with wrong headers #64962

Closed
opened 2026-05-06 10:42:22 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/21498
Author: @quantumnic
Created: 2/16/2026
Status: Closed

Base: mainHead: fix/bugfixes


📝 Commits (1)

  • 530df3a fix: TypeScript .ts files misdetected as video MIME type (#21454) and image URL fetch failing with API headers (#21301)

📊 Changes

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

View changed files

📝 backend/open_webui/routers/files.py (+18 -0)
📝 backend/open_webui/routers/images.py (+4 -4)

📄 Description

Fixes

1. TypeScript .ts files rejected as video MIME type (fixes #21454)

Problem: Browsers detect .ts files as video/vnd.dlna.mpeg-tts or video/mp2t, causing Open WebUI to reject them with 'File type not supported for processing'.

Fix: Added MIME type correction in the file upload handler for .ts, .mts, .cts, and .tsx extensions.

2. Image generation fails with 403 on external image URLs (fixes #21301)

Problem: Generated image URLs are fetched with API headers (Content-Type: application/json, Authorization), causing 403 on external hosting.

Fix: get_image_data() no longer forwards API headers when fetching image URLs.


🔄 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/21498 **Author:** [@quantumnic](https://github.com/quantumnic) **Created:** 2/16/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/bugfixes` --- ### 📝 Commits (1) - [`530df3a`](https://github.com/open-webui/open-webui/commit/530df3aa064093c479d4f2ccb7228c6575049024) fix: TypeScript .ts files misdetected as video MIME type (#21454) and image URL fetch failing with API headers (#21301) ### 📊 Changes **2 files changed** (+22 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/files.py` (+18 -0) 📝 `backend/open_webui/routers/images.py` (+4 -4) </details> ### 📄 Description ## Fixes ### 1. TypeScript .ts files rejected as video MIME type (fixes #21454) **Problem:** Browsers detect `.ts` files as `video/vnd.dlna.mpeg-tts` or `video/mp2t`, causing Open WebUI to reject them with 'File type not supported for processing'. **Fix:** Added MIME type correction in the file upload handler for `.ts`, `.mts`, `.cts`, and `.tsx` extensions. ### 2. Image generation fails with 403 on external image URLs (fixes #21301) **Problem:** Generated image URLs are fetched with API headers (Content-Type: application/json, Authorization), causing 403 on external hosting. **Fix:** `get_image_data()` no longer forwards API headers when fetching image URLs. --- <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-05-06 10:42:22 -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#64962