Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions finbot/mcp/servers/findrive/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def upload_file(
retrieval. Use this for storing invoice PDFs, receipts, and supporting
documentation.
"""
if not filename or not filename.strip():
return {"error": "Filename must not be empty"}

max_size = config.get("max_file_size_kb", 500) * 1024
if len(content.encode("utf-8")) > max_size:
return {"error": f"File exceeds maximum size of {config.get('max_file_size_kb', 500)}KB"}
Expand Down
Loading