Skip to content

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.

fix: I2V image upload — use direct fetch() for FormData upload

PurpleDoubleDf475bea8660a
diff --git a/CLAUDE.md b/CLAUDE.md
index 7e9b6b7c..8299d905 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -72,6 +72,7 @@ src-tauri/src/commands/ — Rust commands: install, process, download, prox
38. **Chat homepage null crash fix** — getProviderIdFromModel(), isThinkingCompatible(), isAgentCompatible() all crashed with "Cannot read properties of null (reading 'split')" when activeModel was null after fresh install. Added null guards to all three functions.
39. **Light Theme contrast fix** — ModelCard model names were invisible in light mode (text-gray-200 on white). Fixed: dark:text-gray-200 text-gray-800. Also fixed ModelManager buttons and ModelCard hover/active states for light theme.
40. **Gemma 4 31B Heretic download URL fix** — llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF repo was deleted (404). Replaced with Stabhappy/gemma-4-31B-it-heretic-Gguf. All 105 download URLs verified HTTP 200/302.
+41. **I2V image upload fix** — uploadImage() used localFetch() which only accepts string body, not FormData. FormData was silently corrupted (sent as "[object FormData]") and Content-Type was forced to application/json instead of multipart/form-data. Fixed: use direct fetch() which handles FormData natively.
### What's LEFT to finish v2.3.0:
1. **Tauri proxy_localhost investigation** — reqwest in Tauri subprocess can't reach localhost. Direct fetch workaround in place but root cause unknown. Low priority since workaround works. Deferred to next release.
diff --git a/src/api/comfyui.ts b/src/api/comfyui.ts
index a961bc78..f76c54c3 100644
--- a/src/api/comfyui.ts
+++ b/src/api/comfyui.ts
@@ -675,7 +675,9 @@ export async function uploadImage(file: File): Promise<string> {
formData.append('image', file)
formData.append('overwrite', 'true')
- const res = await localFetch(comfyuiUrl('/upload/image'), {
+ // Direct fetch — localFetch only supports string body, not FormData.
+ // FormData needs multipart/form-data which fetch() sets automatically.
+ const res = await fetch(comfyuiUrl('/upload/image'), {
method: 'POST',
body: formData,
})