-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
If I understand correctly, the way to fetch blob content from Google Cloud Storage, as suggested by the google-cloud-java API, right now is using something like:
Storage storage = StorageOptions.getDefaultInstance().getService();
BlobId blobId = BlobId.of("bucket", "blob_name");
Blob blob = storage.get(blobId);
byte[] content = blob.getContent();
This requires us to pass in two arguments: bucket and blob_name, but normally what we would want to pass in, originally, would be a gs:// url.
I want to know whether there exists a function that can parse a gs URL and return the bucket and blob parts, like the parseGlob function here. I feel this might be something that exists in the google-cloud-java library already so I don't need to reinvent the wheel.
ashomokdev, allieychen, bunadmitrii, Mazyod, travishen and 3 more
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.