This commit is contained in:
Tim Baek
2025-12-31 02:27:55 -05:00
parent 2acee80829
commit 6351077958

View File

@@ -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)