“Uploading .xlsx to File Search Store fails (400 Bad Request: Upload has already been terminated)”

Hi team,

I followed the official direct upload instructions for the File Search Store:

import time

from google import genai

client = genai.Client(api_key="xxxxxxxxxx")

file_search_store = client.file_search_stores.create(config={"display_name": "sample-store"})

operation = client.file_search_stores.upload_to_file_search_store(
    file="sample.xlsx",
    file_search_store_name=file_search_store.name,
    config={
        "display_name": "sample.xlsx",
    },
)

while not operation.done:
    time.sleep(5)
    operation = client.operations.get(operation)

However, when uploading some Excel files, I get this error:

google.genai.errors.ClientError: 400 Bad Request. {‘message’: ‘Upload has already
been terminated.’, ‘status’: ‘Bad Request’}

Not all Excel files fail—some .xlsx files upload successfully. For the failing files, I couldn’t identify a clear pattern or root cause yet.

I’ve attached a failing Excel file for reference.

https://github.com/user-attachments/files/24851536/sample.xlsx

Has anyone seen this issue or knows what characteristics (size, content, structure, encryption, etc.) might cause this error?
Happy to provide more logs or details if needed.

Thanks.