Skip to content

Support File URLs in GenAI File API for Direct Upload #130 #413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

code-soubhik
Copy link
Contributor

Currently, the GenAI File API requires a local file path for uploads. This issue proposes adding support for file URLs (e.g., https://example.com/file.pdf) to allow users to upload files directly without manually downloading them first.

Proposed Enhancement:

  • Created a wrapper function GoogleAIFileManager.uploadRemoteFile to accept file URLs in addition to local file paths.
  • Automatically fetch the file from the provided URL and upload it to the API.
  • Ensure compatibility with different file types (images, videos, PDFs, etc.).

Why this is needed:

  • No need to download the file, it can add directly.

Issue:
File URL option for the GenAI File API #130

@Annhiluc Annhiluc added type:feature request New feature request/enhancement status:triaged Issue/PR triaged to the corresponding sub-team p3 labels Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3 status:triaged Issue/PR triaged to the corresponding sub-team type:feature request New feature request/enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants