Skip to content

Commit

Permalink
fix(expiration): Add expiration back
Browse files Browse the repository at this point in the history
Signed-off-by: dark0dave <[email protected]>
  • Loading branch information
dark0dave committed Feb 19, 2024
1 parent f06cfdb commit d5e8ee1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions storages/backends/gcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ def client(self):
credentials.refresh(requests.Request())
if not hasattr(credentials, "service_account_email"):
credentials.service_account_email = self.sa_email
_LOGGER.debug(f"Signing email: {credentials.service_account_email}")
self.credentials = credentials
if self._client is None:
self._client = Client(project=project_id, credentials=self.credentials)
Expand Down Expand Up @@ -330,9 +329,13 @@ def url(self, name, parameters=None):
quoted_name=_quote(name, safe=b"/~"),
)
elif not self.custom_endpoint:
return blob.generate_signed_url(**self.signed_url_extra())
return blob.generate_signed_url(
expiration=self.expiration,
**self.signed_url_extra()
)
else:
return blob.generate_signed_url(
expiration=self.expiration,
api_access_endpoint=self.custom_endpoint,
**self.signed_url_extra()
)
Expand Down

0 comments on commit d5e8ee1

Please sign in to comment.