Closed MichaelVonB closed 9 months ago
BlobStorage
azure-storage-blob-12.25.1
We upload blob with metaData
BlobParallelUploadOptions options = new BlobParallelUploadOptions(byteArrayInputStream) .setRequestConditions(new BlobRequestConditions().setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD)) // sets overwrite files to false .setMetadata(Map.of("foo", "bar")) .setHeaders(jsonHeaders); blobClient.uploadWithResponse(options, null, Context.NONE);
and query them later on essentially like this
BlobContainerClient blobContainerClient = blobServiceClient.getBlobContainerClient("my-blob-container-client"); List<Map<String, String>> metaDataList = blobContainerClient.listBlobs().stream() .map(BlobItem::getMetadata) .toList();
But this will be a List of nulls. However I can see in the azure portal that the meta data is filled.
This works but I would expect the other solution to work aswell
List<Map<String, String>> metaDataListFull = blobContainerClient.listBlobs().stream() .map(it -> blobContainerClient.getBlobClient(it.getName())) .map(it -> it.getProperties().getMetadata()) .toList();
This was the wrong place. Created an issue at the right repo. See https://github.com/Azure/azure-sdk-for-java/issues/38913
Which service(blob, file, queue, table) does this issue concern?
BlobStorage
Which version of the SDK was used?
azure-storage-blob-12.25.1
What problem was encountered?
We upload blob with metaData
and query them later on essentially like this
But this will be a List of nulls. However I can see in the azure portal that the meta data is filled.
Have you found a mitigation/solution?
This works but I would expect the other solution to work aswell