Skip to content

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