Skip to content

Conversation

@jwilkinson87
Copy link
Contributor

This pull request makes a minor improvement to the way image MIME types are determined in the ImagesRouter class. Instead of using Files.probeContentType, it now uses URLConnection.guessContentTypeFromName, providing a fallback to "image/png" if the type cannot be determined.

  • Image MIME Type Detection:
    • Changed MIME type detection in ImagesRouter from Files.probeContentType to URLConnection.guessContentTypeFromName, improving reliability and adding a default fallback to "image/png" if the type is unknown.
    • Added import for java.net.URLConnection to support the new MIME type detection method.

@github-actions
Copy link

There is a problem with the Gemini CLI PR review. Please check the action logs for details.

@jwilkinson87 jwilkinson87 merged commit 797ec63 into main Oct 14, 2025
2 of 3 checks passed
@jwilkinson87 jwilkinson87 deleted the fix/default-mime-type-for-image branch October 14, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants