Skip to content

fix(desktop): windows clipboard images come thru as data not file#12549

Closed
abdiths wants to merge 1 commit intoanomalyco:devfrom
abdiths:fix/file-url-clipboard-windows-crash
Closed

fix(desktop): windows clipboard images come thru as data not file#12549
abdiths wants to merge 1 commit intoanomalyco:devfrom
abdiths:fix/file-url-clipboard-windows-crash

Conversation

@abdiths
Copy link
Copy Markdown
Contributor

@abdiths abdiths commented Feb 7, 2026

What does this PR do?

Fixes a crash on Windows when pasting images from the clipboard.

The prompt pipeline treated clipboard images as file: URLs which throws on non‑file schemes like data: - for example a random screenshot using Snipping Tool file url path:

data:image/png;base64,iVBORw0KG....

If the URL isn’t a real file path, we log a warning and pass the file part through without attempting to read from disk. This prevents the hard failure while keeping existing behavior unchanged for valid file URLs.

How did you verify your code works?

  • Manually pasted an image from the clipboard on Windows 11; the prompt no longer crashes.
  • Verified normal file attachments still work as before.

Fixes #12547

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 7, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions bot closed this Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on Windows when pasting images from clipboard (ERR_INVALID_URL_SCHEME)

1 participant