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 Jan 22, 2024
1 parent f06cfdb commit c0ff345
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions storages/backends/gcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def get_default_settings(self):
"location": setting("GS_LOCATION", ""),
"default_acl": setting("GS_DEFAULT_ACL"),
"querystring_auth": setting("GS_QUERYSTRING_AUTH", True),
"expiration": setting("GS_EXPIRATION", timedelta(seconds=86400)),
"expiration": setting("GS_EXPIRATION", timedelta(seconds=31536000)),
"gzip": setting("GS_IS_GZIPPED", False),
"gzip_content_types": setting(
"GZIP_CONTENT_TYPES",
Expand Down Expand Up @@ -330,9 +330,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 c0ff345

Please sign in to comment.