mirror of
https://github.com/openai/codex.git
synced 2026-11-13 06:45:07 +00:00
Fix: gracefully error out for unsupported images (#7478)
Fix for #7459 ## What Since codex errors out for unsupported images, stop attempting to base64/attach them and instead emit a clear placeholder when the file isn’t a supported image MIME. ## Why Local uploads for unsupported formats (e.g., SVG/GIF/etc.) were dead-ending after decode failures because of the 400 retry loop. Users now get an explicit “cannot attach … unsupported image format …” response. ## How Replace the fallback read/encode path with MIME detection that bails out for non-image or unsupported image types, returning a consistent placeholder. Unreadable and invalid images still produce their existing error placeholders.
This commit is contained in:
1 parent
9df70a0772
commit
ac3237721e
3 files changed
+55
-33
No files matched your search
Generated
-1
@@ -1491,7 +1491,6 @@ name = "codex-protocol"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64",
|
||||
"codex-git",
|
||||
"codex-utils-image",
|
||||
"icu_decimal",
|
||||
|
||||
Reference in new issue
Block a user