Skip to content

Commit 6f1ad08

Browse files
author
shaunsephton
committed
Merge commit 'chr15m/master'
2 parents 9bb00eb + 3c1032d commit 6f1ad08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ckeditor/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ def create_thumbnail(filename):
6161
def get_media_url(path):
6262
"""
6363
Determine system file's media url.
64-
# XXX: seems very flaky, needs refactor.
6564
"""
66-
url = settings.MEDIA_URL + path.split(settings.MEDIA_ROOT)[1]
65+
base = getattr(settings, "CKEDITOR_UPLOAD_URL", settings.MEDIA_URL)
66+
url = base + os.path.basename(path)
6767
return url
6868

6969

0 commit comments

Comments
 (0)