You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: branches/autosynth-dlp/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Blob.java
+23-7Lines changed: 23 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -512,17 +512,33 @@ public Blob reload(BlobSourceOption... options) {
512
512
* current blob metadata are at their latest version use the {@code metagenerationMatch} option:
Copy file name to clipboardExpand all lines: branches/autosynth-dlp/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Storage.java
+17-5Lines changed: 17 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1718,17 +1718,29 @@ Blob create(
1718
1718
1719
1719
/**
1720
1720
* Updates blob information. Original metadata are merged with metadata in the provided {@code
1721
-
* blobInfo}. To replace metadata instead you first have to unset them. Unsetting metadata can be
1722
-
* done by setting the provided {@code blobInfo}'s metadata to {@code null}.
1721
+
* blobInfo}. If the original metadata already contains a key specified in the provided {@code
1722
+
* blobInfo's} metadata map, it will be replaced by the new value. Removing metadata can be done
1723
+
* by setting that metadata's value to {@code null}.
1724
+
*
1725
+
* <p>Example of adding new metadata values or updating existing ones.
1726
+
*
1727
+
* <pre>{@code
1728
+
* String bucketName = "my_unique_bucket";
1729
+
* String blobName = "my_blob_name";
1730
+
* Map<String, String> newMetadata = new HashMap<>();
0 commit comments