Skip to content

Commit

Permalink
Merge pull request #236 from aozarov/master
Browse files Browse the repository at this point in the history
add example usage for Storage.signUrl
  • Loading branch information
mziccard committed Oct 9, 2015
2 parents f7d30a6 + c8b2823 commit 9f95061
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,15 @@ public static Builder builder() {
* is only valid within a certain time period.
* This is particularly useful if you don't want publicly
* accessible blobs, but don't want to require users to explicitly log in.
* <p>
* Example usage of creating a signed URL that is valid for 2 weeks:
* <pre> {@code
* service.signUrl(BlobInfo.of("bucket", "name"), TimeUnit.DAYS.toSeconds(14));
* }</pre>
*
* @param blobInfo the blob associated with the signed url
* @param expirationTimeInSeconds the signed URL expiration (using epoch time)
* @param options optional URL signing options
* @see <a href="https://cloud.google.com/storage/docs/access-control#Signed-URLs">Signed-URLs</a>
*/
URL signUrl(BlobInfo blobInfo, long expirationTimeInSeconds, SignUrlOption... options);
Expand Down

0 comments on commit 9f95061

Please sign in to comment.