Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get file reference from URI #2057

Closed
paymog opened this issue Sep 3, 2022 · 3 comments
Closed

Get file reference from URI #2057

paymog opened this issue Sep 3, 2022 · 3 comments
Labels
api: storage Issues related to the googleapis/nodejs-storage API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@paymog
Copy link

paymog commented Sep 3, 2022

Does this library offer users a way to get a reference to a file in GCS from a URI? Suppose I have a uri like the following: gs://mybucket/myvideo.mov.

Ideally I'd like to have an api like the following:

import { Storage } from '@google-cloud/storage';
const storage = new Storage();

const file = storage.getFileFromUri("gs://mybucket/myvideo.mov")

// do stuff with the file like like change it's metadata or download it

Is this possible or will I have to write my own utility function to parse the gs://... uri?

@paymog paymog added priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue. labels Sep 3, 2022
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/nodejs-storage API. label Sep 3, 2022
@danielbankhead danielbankhead self-assigned this Sep 6, 2022
@danielbankhead
Copy link
Contributor

Hey @paymog, this sounds a lot like:

We think this would be a handy feature! We'll add this functionality in a future release.

@danielbankhead danielbankhead added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed type: question Request for information or clarification. Not an issue. labels Sep 6, 2022
@danielbankhead danielbankhead removed their assignment Sep 6, 2022
@paymog
Copy link
Author

paymog commented Sep 6, 2022

ah yup, you're right!

@shaffeeullah
Copy link
Contributor

closing this as a duplicate of #1898
we'll track updates to this feature request there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/nodejs-storage API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants