Environment details
- Programming language: Java
- OS: macOS
- Language runtime version: Java 11+
- Package version: 1.38.0
Steps to reproduce
- Create an
UploadToFileSearchStoreConfig with displayName set:
UploadToFileSearchStoreConfig config = UploadToFileSearchStoreConfig.builder()
.displayName("my-document")
.build();
client.fileSearchStores.uploadToFileSearchStore(storeName, file, config);
- The displayName is silently dropped from the actual API request.
Root Cause
In FileSearchStores.java, the getUploadUrl() method (line 910-915) creates a new UploadToFileSearchStoreConfig with only httpOptions and shouldReturnHttpResponse, discarding the original config's fields:
UploadToFileSearchStoreResumableResponse response =
privateUploadToFileSearchStore(
fileSearchStoreName,
UploadToFileSearchStoreConfig.builder()
.httpOptions(httpOptions)
.shouldReturnHttpResponse(true)
.build());
This also affects customMetadata and chunkingConfig.
Expected Behavior
The original config fields (displayName, customMetadata, chunkingConfig) should be preserved and included in the request to the API.
Environment details
Steps to reproduce
UploadToFileSearchStoreConfigwithdisplayNameset:Root Cause
In
FileSearchStores.java, thegetUploadUrl()method (line 910-915) creates a newUploadToFileSearchStoreConfigwith onlyhttpOptionsandshouldReturnHttpResponse, discarding the originalconfig's fields:This also affects customMetadata and chunkingConfig.
Expected Behavior
The original config fields (displayName, customMetadata, chunkingConfig) should be preserved and included in the request to the API.