[PR #20281] [CLOSED] fix: allow calculate_sha256 to accept file objects for GGUF URL upload #112855

Closed
opened 2026-05-18 13:04:36 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/20281
Author: @Classic298
Created: 12/30/2025
Status: Closed

Base: devHead: fix/gguf-url-upload-sha256-type-error


📝 Commits (1)

  • cb7a4cc fix: allow calculate_sha256 to accept file objects for GGUF URL upload

📊 Changes

1 file changed (+13 additions, -3 deletions)

View changed files

📝 backend/open_webui/utils/misc.py (+13 -3)

📄 Description

Update calculate_sha256 in misc.py to accept both file paths and file-like objects. This fixes TypeError when downloading GGUF models via URL, where download_file_stream passes a BufferedReader instead of a file path. Fixes #20263

https://github.com/open-webui/open-webui/issues/20263

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 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/20281 **Author:** [@Classic298](https://github.com/Classic298) **Created:** 12/30/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix/gguf-url-upload-sha256-type-error` --- ### 📝 Commits (1) - [`cb7a4cc`](https://github.com/open-webui/open-webui/commit/cb7a4ccf0dc6641ea43ef06fd62621ef87ce8617) fix: allow calculate_sha256 to accept file objects for GGUF URL upload ### 📊 Changes **1 file changed** (+13 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/utils/misc.py` (+13 -3) </details> ### 📄 Description Update calculate_sha256 in misc.py to accept both file paths and file-like objects. This fixes TypeError when downloading GGUF models via URL, where download_file_stream passes a BufferedReader instead of a file path. Fixes #20263 https://github.com/open-webui/open-webui/issues/20263 ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <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-18 13:04:36 -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#112855