Skip to content

Commit 505ca5a

Browse files
committed
https://github.com/aliyun/django-oss-storage/pull/41
1 parent 26c4b5a commit 505ca5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

django_oss_storage/backends.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation
1515
from django.core.files.storage import Storage
1616
from django.conf import settings
17-
from django.utils.encoding import force_text, force_bytes
17+
from django.utils.encoding import force_str
1818
from django.utils.deconstruct import deconstructible
1919
from django.utils.timezone import utc
2020
from tempfile import SpooledTemporaryFile
@@ -97,7 +97,7 @@ def _get_key_name(self, name):
9797
# urljoin won't work if name is absolute path
9898
name = name.lstrip('/')
9999

100-
base_path = force_text(self.location)
100+
base_path = force_str(self.location)
101101
final_path = urljoin(base_path + "/", name)
102102
name = os.path.normpath(final_path.lstrip('/'))
103103

0 commit comments

Comments
 (0)