Signed URL prefix
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
});
Thanks @gabrielmcreynolds we will take a look at adding this functionality.
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.