Skip to content

Commit 89392ea

Browse files
authored
Merge pull request #79 from octue/mixin-functionality
Add complete method list to the blob field mixin
2 parents cbbe530 + a5ea536 commit 89392ea

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

django_gcp/storage/blob_utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,18 @@ def get_blob_name(self, field_name):
143143
"""Get blob name for the given model field name"""
144144
return get_blob_name(self, field_name)
145145

146+
def get_console_url(self, field_name):
147+
"""Get a URL to where the file resides in GCP cloud console"""
148+
return get_console_url(self, field_name)
149+
146150
def get_path(self, field_name):
147151
"""Get the path of the blob in the object store for the given model field name"""
148152
return get_path(self, field_name)
149153

150154
def get_signed_url(self, field_name, expiration=None):
151155
"""Get a signed URL to the blob for the given model field name"""
152156
return get_signed_url(self, field_name, expiration)
157+
158+
def get_signed_download_url(self, field_name, expiration=None):
159+
"""Get a signed URL to the blob with the response disposition set"""
160+
return get_signed_download_url(self, field_name, expiration)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "django-gcp"
3-
version = "0.16.0"
3+
version = "0.16.1"
44
description = "Utilities to run Django on Google Cloud Platform"
55
authors = ["Tom Clark"]
66
license = "MIT"

0 commit comments

Comments
 (0)