Open alberto-alvarado-m opened 4 years ago
Hi @alberto-alvarado-m,
Thank you for your post.
By default, the listBlobs minimal overload does not send back the metadata. Metadata is one of the optional properties that can be returned back in a listBlobs call, so to retrieve metadata, I'd recommend you use the following code snippet to listBlobs.
ListBlobsOptions options = new ListBlobsOptions().setDetails(new BlobListDetails().setRetrieveMetadata(true));
containerClient.listBlobs(options, null);
Please let me know in case you run into any other issues.
Its resolved my issue as well, BUT the behaviour differs to the current Azurite (v3.11.0) Implementation.
Azurite automatically returns the metadata by default in listBlobs() which leads on our side to successful Junit-Tests whereas changing to the official Azure Cloud Blob Storage leads to NULL Metadata (solution is top ).
Please adapt Azurite accordingly, its not acceptable to have an offical Microsoft-Envrionment which behaviour is different from production environments.
Hi @MaRieck Thank you for reporting this. I have transferred this issue to the Azurite repo where they will be able to help clarify the behavior of Azurite and take this up as a feature request if needed.
@alberto-alvarado-m, @MaRieck
Thanks for reporting this issue! We will evaluate it.
Azurite welcome contribution. It would be great if you could raise PR to fix this issue in Azurite!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug I can successfully add Metadata to a Blob using the Storage Blob SDK v12. I can see in Azure Portal and in the Storage Explorer that the metadata has been added to my blob, but when I retrieve the blob with the SDK, the metadata is always NULL.
Exception or Stack Trace No errors or exceptions when retrieving.
To Reproduce
Code Snippet
Expected behavior Since I have confirmed that the Metadata has been successfully saved, I should be able to retrieve it with the latest Blob SDK (v12).
Setup (please complete the following information):