Skip to content

fix: support multi-file uploads in upload_file#1259

Open
zerone0x wants to merge 2 commits intoChromeDevTools:mainfrom
zerone0x:fix/multi-file-uploads
Open

fix: support multi-file uploads in upload_file#1259
zerone0x wants to merge 2 commits intoChromeDevTools:mainfrom
zerone0x:fix/multi-file-uploads

Conversation

@zerone0x
Copy link
Copy Markdown

Summary

  • allow upload_file to accept multiple file paths via filePaths (keeps filePath for single uploads)
  • pass arrays through to Puppeteer uploadFile / fileChooser accept
  • document new argument in CLI tool definitions

Testing

  • not run (no test suite for this change)

Fixes #1217

@google-cla
Copy link
Copy Markdown

google-cla bot commented Mar 30, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown
Collaborator

@Lightning00Blade Lightning00Blade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert any changes unrelated to the description of the PR (like protocolTimeout).

'The uid of the file input element or an element that will open file chooser on the page from the page content snapshot',
),
filePath: zod.string().describe('The local path of the file to upload'),
filePath: zod
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should try to leave it single argument and have it separated by some separator like other commands.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, let's support comma separated values in filePath to be compatible with the CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support multi-file uploads for existing-session mode

3 participants