Skip to content

Commit 2ffa43e

Browse files
authored
fix: Update image_helpers.py
1 parent 1075cc8 commit 2ffa43e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

openedx/core/djangoapps/user_api/accounts/image_helpers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ def get_profile_image_storage():
3333
An instance of the configured storage backend.
3434
"""
3535
config = settings.PROFILE_IMAGE_BACKEND
36-
storage_class_path = config.get('class', 'django.core.files.storage.FileSystemStorage')
36+
storage_class_path = config.get('class') or getattr(
37+
settings, 'DEFAULT_FILE_STORAGE', 'django.core.files.storage.FileSystemStorage'
38+
)
3739
storage_class = import_string(storage_class_path)
38-
return storage_class(**config.get('options'))
40+
return storage_class(**config.get('options', {}))
3941

4042

4143
def _make_profile_image_name(username):

0 commit comments

Comments
 (0)