0
votes

After storing the blob in the blobStore, it returns the Etag. But i want the URL to access the inputStream, just like amazonS3Client.getUrl(bucketName, key); Here i dont want to use AmazonS3Client but use Jcloud S3 client or BlobStore. Has anybody done this? or in Scality , how do i get the URL of the object store?

Thanks SR

1

1 Answers

0
votes

You can do this two ways depending on whether you have a public access blob or want to grant temporary access to a private access blob. For the former:

URI publicUri = blobStoreContext.getBlobStore().blobMetadata(bucketName, key).getPublicUri();

For the latter:

URI privateUri = blobStoreContext.getSigner().signGetBlob(bucketName, key).getEndpoint();

The latter vends a time-limited URI that authenticates via HTTP query parameters.