[PR #198] [MERGED] Validate file paths, determine mime type, and send proper file metadata #215

Closed
opened 2026-02-13 17:28:06 -06:00 by mirrors · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/HanaokaYuzu/Gemini-API/pull/198
Author: @luuquangvu
Created: 12/16/2025
Status: Merged
Merged: 12/30/2025
Merged by: @HanaokaYuzu

Base: masterHead: master


📝 Commits (2)

  • 11b6bce Validate file paths, determine mime type, and send proper file metadata to resolve content access errors.
  • c1deb41 Refactor: remove MIME type detection logic and rely on httpx for inference during file uploads

📊 Changes

1 file changed (+9 additions, -3 deletions)

View changed files

📝 src/gemini_webapi/utils/upload_file.py (+9 -3)

📄 Description

Fix: Ensure the correct MIME type is sent for file uploads to resolve the Gemini access denial issue, which currently returns the message: "Normally I can help with things like this, but I don't seem to have access to that content. You can try again or ask me for something else."


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/HanaokaYuzu/Gemini-API/pull/198 **Author:** [@luuquangvu](https://github.com/luuquangvu) **Created:** 12/16/2025 **Status:** ✅ Merged **Merged:** 12/30/2025 **Merged by:** [@HanaokaYuzu](https://github.com/HanaokaYuzu) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`11b6bce`](https://github.com/HanaokaYuzu/Gemini-API/commit/11b6bced71ad3ec0d25fb5955fbb26914801db07) Validate file paths, determine mime type, and send proper file metadata to resolve content access errors. - [`c1deb41`](https://github.com/HanaokaYuzu/Gemini-API/commit/c1deb41c3513d6604e101d662ed076e2ea19d6a4) Refactor: remove MIME type detection logic and rely on httpx for inference during file uploads ### 📊 Changes **1 file changed** (+9 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/gemini_webapi/utils/upload_file.py` (+9 -3) </details> ### 📄 Description Fix: Ensure the correct MIME type is sent for file uploads to resolve the Gemini access denial issue, which currently returns the message: "Normally I can help with things like this, but I don't seem to have access to that content. You can try again or ask me for something else." --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirrors 2026-02-13 17:28:06 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mirrors/Gemini-API#215
No description provided.