autoUploadDownloadFiles is enabled (default).
Automatic File Handling
By default, Composio automatically handles file uploads and downloads:Manual File Upload
upload()
Manually upload a file:File | string
required
File object or path to local file
string
required
Tool that will use the file
string
required
Toolkit the tool belongs to
Manual File Download
download()
Manually download a file:string
required
S3 URL of the file to download
string
required
Tool that downloaded the file
string
required
MIME type of the file
Disabling Automatic Handling
Disable automatic file handling for manual control:Complete Example
Supported File Operations
Upload Tools
GOOGLE_DRIVE_UPLOADDROPBOX_UPLOAD_FILESLACK_UPLOAD_FILEGMAIL_SEND_EMAIL(with attachments)
Download Tools
GOOGLE_DRIVE_DOWNLOADDROPBOX_DOWNLOAD_FILESLACK_GET_FILEGMAIL_GET_ATTACHMENT
File Types
FileUploadData
FileDownloadData
Best Practices
- Auto Handling: Use automatic file handling for simplicity
- File Cleanup: Clean up downloaded files after use
- Error Handling: Handle upload/download failures
- Size Limits: Be aware of file size limits
- Temporary Files: Use temp directories for downloads
Platform Support
File operations are supported in:- ✅ Node.js
- ✅ Bun
- ❌ Browser (use File objects)
- ❌ Cloudflare Workers (no filesystem)
- ⚠️ Deno (with —allow-read/—allow-write)
Next Steps
Tools API
Learn about tools
Platform Support
Runtime compatibility
Composio Class
Main SDK reference