mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-09 03:18:18 +00:00
fix: a model downloaded by URL in Manage Ollama can reach Ollama with the end of the file missing (#31974)
When a model file was downloaded by URL in Manage Ollama, the end of the file could still be on its way to disk when Open WebUI sent it to Ollama, so Ollama got a cut-off copy. The download is now fully on disk before it is sent, so Ollama gets the whole file. Fixes #31956
This commit is contained in:
parent
c01d4825af
commit
1e75614505
1 changed files with 1 additions and 0 deletions
|
|
@ -1615,6 +1615,7 @@ async def download_file_stream(
|
|||
progress = round((current_size / progress_total) * 100, 2)
|
||||
yield f'data: {{"progress": {progress}, "completed": {current_size}, "total": {total_size}}}\n\n'
|
||||
|
||||
await f.flush()
|
||||
done = True
|
||||
hashed = await asyncio.to_thread(calculate_sha256, file_path, chunk_size)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue