The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(download): chat image/video Download uses a native Save-As, not the WebView2 blob-anchor
purple33625e2e3b10
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rsindex 8d270a02..9cbfc945 100644--- a/src-tauri/src/main.rs+++ b/src-tauri/src/main.rs@@ -149,6 +149,7 @@ fn main() {commands::filesystem::fs_search,commands::filesystem::fs_info,commands::filesystem::save_text_file_dialog,+ commands::filesystem::save_binary_file_dialog,// Systemcommands::system::system_info,commands::system::process_list,diff --git a/src/api/backend.ts b/src/api/backend.tsindex c8304603..a42a505a 100644--- a/src/api/backend.ts+++ b/src/api/backend.ts@@ -556,7 +556,12 @@ export async function downloadComfyFile(filename: string, subfolder: string = ''return}- // Tauri mode: fetch bytes through proxy, create blob URL+ // Tauri mode: fetch the bytes through the proxy, then a NATIVE Save-As dialog.+ // The old blob-URL + anchor-click pattern is UNRELIABLE in WebView2 — the+ // webview navigates to the blob URL instead of saving it, so clicking Download+ // did nothing (David 2026-06-12: "der download button geht nicht für video und+ // image mcp"). save_binary_file_dialog writes the real bytes to the chosen path+ // (same native dialog the chat file-artifact card uses, which works).const invoke = await getInvoke()try {const bytes = await invoke('proxy_localhost_stream', {@@ -564,24 +569,29 @@ export async function downloadComfyFile(filename: string, subfolder: string = ''method: 'GET',body: null,}) as number[]- const blob = new Blob([new Uint8Array(bytes)])- const blobUrl = URL.createObjectURL(blob)- const a = document.createElement('a')- a.href = blobUrl- a.download = filename- document.body.appendChild(a)- a.click()- document.body.removeChild(a)- URL.revokeObjectURL(blobUrl)+ const ext = filename.includes('.') ? filename.split('.').pop()! : 'bin'+ // Returns the chosen path, or null if the user cancelled — nothing to do then.+ await invoke('save_binary_file_dialog', {+ bytes,+ defaultName: filename,+ extension: ext,+ extLabel: ext.toUpperCase(),+ })} catch (err) {log.error('[downloadComfyFile] Failed', { err })- // Fallback: try direct link- const a = document.createElement('a')- a.href = url- a.download = filename- document.body.appendChild(a)- a.click()- document.body.removeChild(a)+ // Last-resort fallback: blob-anchor (unreliable in WebView2, but better than+ // a silent no-op if the native dialog command is somehow unavailable).+ try {+ const bytes = await invoke('proxy_localhost_stream', { url, method: 'GET', body: null }) as number[]+ const blobUrl = URL.createObjectURL(new Blob([new Uint8Array(bytes)]))+ const a = document.createElement('a')+ a.href = blobUrl+ a.download = filename+ document.body.appendChild(a)+ a.click()+ document.body.removeChild(a)+ URL.revokeObjectURL(blobUrl)+ } catch { /* give up */ }}}