Files
crewAI/docs
Iris Clawd 0000239b3c feat: add google_drive/upload_from_file action for token-efficient file uploads
Add a new CrewAIPlatformFileUploadTool that reads files directly from disk
and uploads to Google Drive via the platform API, bypassing the LLM context
window entirely. This solves two problems:

1. File content no longer consumes LLM tokens
2. Binary/large files no longer risk exceeding the 128k context limit

The new action accepts a file_path parameter instead of content. It handles:
- Auto-detection of MIME type from file extension
- Optional custom file name (defaults to local filename)
- File size validation (50 MB limit for simple uploads)
- Base64 encoding of file content before sending to API

The existing google_drive/upload_file action is unchanged — full backwards
compatibility with the 10k+ existing executions.

Changes:
- New tool: CrewAIPlatformFileUploadTool
- Builder auto-injects the tool when apps include google_drive or
  google_drive/upload_from_file
- 14 unit tests covering upload, error handling, MIME detection, SSL
- Updated docs with new action reference and usage examples
2026-04-03 20:30:34 +00:00
..