Upload a file to the user's Drive. The file must be base64-encoded. Max file size: 10 MB. Allowed types: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, TXT, CSV, JPG, JPEG, PNG, GIF, WEBP, SVG, BMP. Filenames are sanitized (spaces to underscores, special characters removed).
# upload_file
## When to use
Upload a file to the user's Drive. The file must be base64-encoded. Max file size: 10 MB. Allowed types: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, TXT, CSV, JPG, JPEG, PNG, GIF, WEBP, SVG, BMP. Filenames are sanitized (spaces to underscores, special characters removed).
## Parameters to validate before calling
- filename (string, required) — Original filename with extension (e.g., "report.pdf", "logo.png")
- mime_type (string, required) — MIME type of the file (e.g., "application/pdf", "image/png", "text/csv")
- file_data (string, required) — Base64-encoded file content
- private (boolean, optional) — Privacy flag. Default: true (file is private to the user).