From c7c3e753fdfb48b289f3aec04dadd705e47212fd Mon Sep 17 00:00:00 2001 From: Daniel Valenzuela Date: Fri, 20 Dec 2024 23:58:12 -0300 Subject: [PATCH] fix: replace spaces in file_path --- openedx/core/djangoapps/content_libraries/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openedx/core/djangoapps/content_libraries/views.py b/openedx/core/djangoapps/content_libraries/views.py index 94197f50877..c8c91d50331 100644 --- a/openedx/core/djangoapps/content_libraries/views.py +++ b/openedx/core/djangoapps/content_libraries/views.py @@ -799,6 +799,7 @@ def put(self, request, usage_key_str, file_path): """ Replace a static asset file belonging to this block. """ + file_path = file_path.replace(" ", "_") # Messes up url/name correspondence due to URL encoding. usage_key = LibraryUsageLocatorV2.from_string(usage_key_str) api.require_permission_for_library_key( usage_key.lib_key, request.user, permissions.CAN_EDIT_THIS_CONTENT_LIBRARY,