Send "download_progress" as websocket event.

This commit is contained in:
Robin Huang 2024-08-06 21:22:01 -07:00
parent cce1ccf9c9
commit 2380ccce0a

View File

@ -564,7 +564,8 @@ class PromptServer():
@routes.post("/download") @routes.post("/download")
async def download_handler(request): async def download_handler(request):
async def report_progress(filename: str, status: DownloadStatus): async def report_progress(filename: str, status: DownloadStatus):
await self.send_json(filename, { await self.send_json("download_progress", {
"filename": filename,
"progress_percentage": status.progress_percentage, "progress_percentage": status.progress_percentage,
"status": status.status, "status": status.status,
"message": status.message "message": status.message