From d5e8ee1b0eef24ef0e20d5e3e829bd42e5b7f5fb Mon Sep 17 00:00:00 2001 From: dark0dave Date: Mon, 22 Jan 2024 16:10:46 +0000 Subject: [PATCH] fix(expiration): Add expiration back Signed-off-by: dark0dave --- storages/backends/gcloud.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/storages/backends/gcloud.py b/storages/backends/gcloud.py index 77b3e144..83d8faa7 100644 --- a/storages/backends/gcloud.py +++ b/storages/backends/gcloud.py @@ -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) @@ -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() )