Skip to content

Conversation

@Konikz
Copy link

@Konikz Konikz commented Apr 3, 2025

Description

Implements multiple file upload support by adding a new upload_many method to both Files and AsyncFiles classes. This enhancement allows users to upload multiple files in a single request, making batch operations more efficient.

Example

# Upload multiple files at once
files = client.files.upload_many(
    files=["doc1.pdf", "doc2.pdf", "doc3.pdf"]
)

# With custom configurations
files = client.files.upload_many(
    files=["doc1.pdf", "doc2.pdf"],
    configs=[
        {"display_name": "First Document"},
        {"display_name": "Second Document"}
    ]
)

Changes

  • Added upload_many method to Files and AsyncFiles classes
  • Implemented proper validation and error handling
  • Added comprehensive docstrings with examples

Closes #293

@google-cla
Copy link

google-cla bot commented Apr 3, 2025

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.

@Konikz Konikz force-pushed the feature/multiple-file-upload branch from 4737293 to 6ed8e99 Compare April 25, 2025 07:07
@MarkDaoust MarkDaoust added do not merge Indicates a pull request not ready for merge, due to either quality or timing. and removed do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels May 5, 2025
@janasangeetha janasangeetha self-assigned this Dec 23, 2025
@janasangeetha janasangeetha added the size:XL Code changes > 100 lines label Dec 23, 2025
@janasangeetha
Copy link
Collaborator

Hey @Konikz
Thanks for contributing!
Kindly resolve the conflicts with the branch.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Already my favourite AI SDK! Suggestion: Multiple files upload within one request!

3 participants