Skip to content

Commit

Permalink
Fix martor upload
Browse files Browse the repository at this point in the history
  • Loading branch information
a-belhadj authored and Sispheor committed Jun 4, 2024
1 parent d41c1df commit e7dc30a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ drf-yasg = "1.21.7"
graphviz = "0.20.3"
django-taggit = "5.0.1"
mike = "2.1.1"
martor = "1.6.44"
martor = "^1.6.44"
django-tempus-dominus = "5.1.2.17"
gunicorn = "21.2.0"
django-tables2 = "2.7.0"
Expand Down
2 changes: 1 addition & 1 deletion service_catalog/views/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def markdown_uploader(request):
Makdown image upload for locale storage
and represent as json to markdown editor.
"""
if request.method == 'POST' and request.is_ajax():
if request.method == 'POST' and request.headers.get('x-requested-with') == 'XMLHttpRequest':
if 'markdown-image-upload' in request.FILES:
image = request.FILES['markdown-image-upload']
image_types = [
Expand Down

0 comments on commit e7dc30a

Please sign in to comment.