Skip to content

Commit ef16c27

Browse files
committed
add example usage for Storage.signUrl
1 parent 92b6fce commit ef16c27

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • gcloud-java-storage/src/main/java/com/google/gcloud/storage

gcloud-java-storage/src/main/java/com/google/gcloud/storage/Storage.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,11 @@ public static Builder builder() {
632632
* is only valid within a certain time period.
633633
* This is particularly useful if you don't want publicly
634634
* accessible blobs, but don't want to require users to explicitly log in.
635+
* <p/>
636+
* Example usage of creating a signed URL that is valid for 2 weeks:
637+
* <pre> {@code
638+
* service.signUrl(BlobInfo.of("bucket", "name"), TimeUnit.DAYS.toSeconds(14));
639+
* }</pre>
635640
*
636641
* @param blobInfo the blob associated with the signed url
637642
* @param expirationTimeInSeconds the signed URL expiration (using epoch time)

0 commit comments

Comments
 (0)