Closed
Description
There's currently one method for generating signed references:
URL signUrl(BlobInfo blobInfo, long expirationTimeInSeconds, SignUrlOption... options);
There are a number of SignUrlOption
types but its not clear from the interface which ones can be used in combination. For example:
- specifying md5 and contentType should not be allowed for a GET, HEAD or DELETE
- for PUT, md5 and contentType take their values from BlobInfo but the object hasn't been created yet
I also don't see how extension headers or the base URL would be specified.
Instead, can we use a method chain for this:
URI get = datastore.signedReference(bucketName, objectName, expiration).toURI();
String put = datastore.signedReference(bucketName, objectName, expiration)
.forPut().ofContentType("text/plain").toString();