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

Signed URL prefix #2472

Closed
gabrielmcreynolds opened this issue May 21, 2024 · 2 comments
Closed

Signed URL prefix #2472

gabrielmcreynolds opened this issue May 21, 2024 · 2 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

@gabrielmcreynolds
Copy link

I would like the ability to generate a signed url that is valid for all files in a bucket with a given prefix.

There have been multiple issues requesting similar abilities, but it looks like the core ability of Google Cloud supports this. It looks the API allows creation of signed urls with a prefix. It would be nice if this functionality was built into the client library. I'm imagining something along the lines of:

  const [signedUrl] = await storage.bucket(bucketName).getSignedUrl({
    version: 'v4',
    expires: Date.now() + expirationSeconds * 1000,
    prefix: pathPrefix
  });
@gabrielmcreynolds gabrielmcreynolds added 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. labels May 21, 2024
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/nodejs-storage API. label May 21, 2024
@ddelgrosso1
Copy link
Contributor

Thanks @gabrielmcreynolds we will take a look at adding this functionality.

@thiyaguk09
Copy link
Contributor

Hi @gabrielmcreynolds thank you for the question. Currently the Google Cloud Storage API does not support creating a signed URL based on a prefix. The documentation reference that you have provided is for the Cloud CDN which supports signed URLs based on a prefix. But for the GCS we do not support the signed URL based on a prefix.

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