Uh oh!
There was an error while loading. Please reload this page.
fix(tui): read tool uppercase/mixed case image extensions - #11333
fix(tui): read tool uppercase/mixed case image extensions#11333alexyaroshuk wants to merge 15 commits into
Conversation
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one potentially related PR: PR #11312: fix(app): binary file handling in file view This PR appears to be related as it also addresses binary file handling issues. However, it's focused on the file view in the app rather than the CLI/TUI read tool specifically. You should verify if this addresses the same underlying issue or if they're separate concerns. The current PR #11333 is the primary match for your search terms, which is the PR you're currently checking (so not a duplicate of itself). |
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. |
fixes#10916
What does this PR do?
The problem:
read frame.PNG, .Png, .pNG, etc. returned "Cannot read binary file" error
read frame.png worked fine
Bun's MIME type detection doesn't handle uppercase extensions correctly
The fix: Added extension-based image detection before MIME type detection:
Check file extension (case-insensitive)
Map extension to correct MIME type (png→image/png, jpg→image/jpeg, etc.)
Handle image immediately if extension matches
How did you verify your code works?
Before:
After