fix(drive): pass supportsAllDrives=true in +upload to support Shared Drives#748
Conversation
…lders work Previously the files.create call omitted supportsAllDrives, causing the API to reject --parent values that point to Shared Drive folders (404/403 even when the user had access). The parameter is harmless for My Drive uploads. Fixes googleworkspace#722
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses an issue where file uploads to Shared Drive folders were failing due to missing API parameters. By unconditionally including Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request enables file uploads to Shared Drive folders in the drive +upload command by passing the supportsAllDrives=true parameter to the API request. It also updates the command's help documentation and examples to reflect this support. I have no feedback to provide.
Problem
drive +uploadcallsfiles.createwithout thesupportsAllDrives=truequery parameter. The Drive API rejects any request that targets a Shared Drive folder (via--parent) unless this parameter is present, returning a 404 or 403 even when the user has full access to the Shared Drive.Reported in #722.
Fix
Pass
supportsAllDrives: trueunconditionally in the query params for every+uploadcall. This parameter is documented as harmless for My Drive uploads — it simply opts the request into Shared Drive awareness.Updated
after_helptext to document Shared Drive support.Test plan
supportsAllDrives=trueappears inquery_paramshelpers::driveunit tests passCloses #722
🤖 Generated with Claude Code