diff --git a/static/js/managers/DownloadManager.js b/static/js/managers/DownloadManager.js index a780f5b2..18ebe63b 100644 --- a/static/js/managers/DownloadManager.js +++ b/static/js/managers/DownloadManager.js @@ -882,13 +882,12 @@ export class DownloadManager { let ws = null; let updateProgress = () => { }; let cancelled = false; + const downloadId = Date.now().toString(); try { this.loadingManager.restoreProgressBar(); updateProgress = this.loadingManager.showDownloadProgress(1); updateProgress(0, 0, displayName); - - const downloadId = Date.now().toString(); const wsProtocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://'; ws = new WebSocket(`${wsProtocol}${window.location.host}/ws/download-progress?id=${downloadId}`); @@ -1501,6 +1500,8 @@ export class DownloadManager { this.currentVersion?.id, (this.currentVersion?.files || []).length); } + modalManager.closeModal('downloadModal'); + return this.executeDownloadWithProgress({ modelId: this.modelId, versionId: this.currentVersion.id,