From 635107795800441347c42ad65365047ff78589f1 Mon Sep 17 00:00:00 2001 From: Tim Baek Date: Wed, 31 Dec 2025 02:27:55 -0500 Subject: [PATCH] refac --- backend/open_webui/routers/ollama.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/open_webui/routers/ollama.py b/backend/open_webui/routers/ollama.py index 293bc14c0..7760c422c 100644 --- a/backend/open_webui/routers/ollama.py +++ b/backend/open_webui/routers/ollama.py @@ -1659,11 +1659,10 @@ async def download_file_stream( if done: file.close() + hashed = calculate_sha256(file_path, chunk_size) with open(file_path, "rb") as file: chunk_size = 1024 * 1024 * 2 - hashed = calculate_sha256(file, chunk_size) - url = f"{ollama_url}/api/blobs/sha256:{hashed}" with requests.Session() as session: response = session.post(url, data=file, timeout=30)