mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
(donlt know if this is bug or not) cannot upload markdown file to gemini 2.5 models #509
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @U11Leung on GitHub (Aug 2, 2025).
Self Checks
Dify version
1.7.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
add gemini models in Dify, create a flow or chat whatever, send a .md file and prompt "summarize content"
✔️ Expected Behavior
gemini will read the markdown file and analyze and output the answer
❌ Actual Behavior
error and stop:
[google] Error: PluginInvokeError: {"args":{},"error_type":"ClientError","message":"400 INVALID_ARGUMENT. {'error': {'code': 400, 'message': 'Request contains an invalid argument.', 'status': 'INVALID_ARGUMENT'}}"}
@dosubot[bot] commented on GitHub (Aug 2, 2025):
Markdown file upload is supported in recent Dify versions, but the 400 INVALID_ARGUMENT error from Gemini 2.5 usually means the request payload is missing required parameters or the file isn't formatted as Gemini expects. This can happen if the Gemini plugin version is incompatible—users have reported that downgrading the Gemini plugin to 0.1.5 or 0.1.6 resolves similar issues, as newer plugin versions (like 0.2.x) introduced changes that may break file or multimodal input handling in some flows. Also, Gemini's API often requires a 'text' field even when uploading files, so if Dify is only sending a file link or markdown representation, Gemini may reject it as invalid input.
If you haven't already, try downgrading your Gemini plugin to 0.1.5 or 0.1.6 and restart your services. If the issue persists, enable debug logs and check the payload being sent to Gemini to confirm it includes the required fields (like 'text' or file content, not just a link) reference reference.
Recent code changes confirm markdown files are intended to be supported for upload reference, so this is likely a plugin compatibility or payload formatting issue, not a fundamental limitation.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@U11Leung commented on GitHub (Aug 2, 2025):
other info:
changed the file extension to md.txt, it will work, so it's extension related to some extent.
saw MIME type is application/octet-stream

searched in google forum, found this: https://discuss.ai.google.dev/t/unsupported-mime-type-text-md/83918
sit seems text/md won't work,, Dify doesn't use that anyway
is it possible to use text/plain?
@U11Leung commented on GitHub (Aug 2, 2025):
using gemini plugin 0.3.0
@dosubot[bot] commented on GitHub (Aug 20, 2025):
Hi, @U11Leung. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.
Issue Summary:
Next Steps:
Thank you for your understanding and contribution!