I have created a service using :
storage.Client(project='project_name', credentials=credentials)
https://googleapis.dev/python/storage/latest/client.html
And I'm able to upload, delete and list the files in a users Google Cloud bucket. I've seen an option to download the file to a server, but is there any option to get a downloadable link?
You can get the downloadable link replacing the values of the following string:
If you need to limit permissions or time to make the request, you can generate a Signed URL
You cannot use an access token to sign a URL because access tokens are time limited (about an hour). An alternative to using the private key file to sign a url, is to use IAM's SignBlob functionality. You can use it with
“gsutil”
by the command”gsutil signurl -u --”
as mentioned in documentation. Note that with this method, the signed url is only valid for 12 hours, as compared to the maximum of 7 days as mentioned in the documentation