Skip to content

Conversation

@daiki44
Copy link

@daiki44 daiki44 commented Nov 27, 2025

Problem

When uploading a document to a File Search store via uploadToFileSearchStore using a Blob, the SDK does not send displayName (and related metadata) in the request body used to obtain the upload URL. As a result, created documents can end up with undefined and downstream retrieval/citations lose the friendly name.

Current Behavior

  • config.displayName is accepted by the SDK call, but the value is not forwarded into the uploadToFileSearchStore request body.
  • Documents created in File Search may show displayName: (no display name) even though the caller set it.
  • This makes it hard to show friendly source names in RAG citations / grounding chunks.

Expected Behavior

  • displayName provided in config should be persisted as the created document’s display name.
  • mimeType provided in config should be forwarded consistently as part of the request metadata.
  • SDK behavior should match the underlying File Search Stores API which supports these fields in the request body.

Fix

  • Add displayName and mimeType to the JSON request body passed to the uploadToFileSearchStore endpoint when generating the upload URL.
  • This aligns the SDK with the File Search Stores API request schema (which explicitly allows displayName and mimeType).

@google-cla
Copy link

google-cla bot commented Nov 27, 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.

@daiki44 daiki44 force-pushed the fix/filesearch-upload-metadata branch from 745bcd9 to f7fc35d Compare November 27, 2025 01:55
@shmishra99 shmishra99 self-assigned this Dec 2, 2025
@shmishra99 shmishra99 added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: file Issues related to the Filestore API. labels Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: file Issues related to the Filestore API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants