Skip to content

Commit

Permalink
fix: replace spaces in file_path
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVZ96 committed Dec 21, 2024
1 parent bc4f4ef commit c7c3e75
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions openedx/core/djangoapps/content_libraries/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c7c3e75

Please sign in to comment.