Skip to content

Commit

Permalink
Merge pull request #53 from poulpreben/remove-utf8-encoding
Browse files Browse the repository at this point in the history
Resolves Error: a bytes-like object is required, not 'str'
  • Loading branch information
theriverman authored Sep 2, 2024
2 parents 49d5bed + b31bd4e commit f650255
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_minio_backend/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def url(self, name: str):
try:
u: str = client.presigned_get_object(
bucket_name=self.bucket,
object_name=name.encode('utf-8'),
object_name=name,
expires=get_setting("MINIO_URL_EXPIRY_HOURS", timedelta(days=7)) # Default is 7 days
)
return u
Expand Down

0 comments on commit f650255

Please sign in to comment.