pylixm / django-mdeditor

Django-mdeditor is Markdown Editor plugin application for django base on Editor.md.
https://pypi.org/project/django-mdeditor/
GNU General Public License v3.0
481 stars 103 forks source link

İmage upload not working. Please help! #160

Closed ibrahimcorut closed 2 years ago

ibrahimcorut commented 2 years ago

Django==4.0.3 django-mdeditor==0.1.20 Image upload is not working. I couldn't find how to fix the problem. Couldn't an easier solution like Summernote be added?

[25/Mar/2022 18:47:11] "POST /mdeditor/uploads/?guid=1648223226814 HTTP/1.1" 302 0 Method Not Allowed (GET): /tr/mdeditor/uploads/ Method Not Allowed: /tr/mdeditor/uploads/ [25/Mar/2022 18:47:11] "GET /tr/mdeditor/uploads/?guid=1648223226814 HTTP/1.1" 405 0

pylixm commented 2 years ago

Your custom upload interface does not need 302, you can directly override the plugin's route /mdeditor/uploads.

ibrahimcorut commented 2 years ago

I made a multi languge site. It was solved by typing in settings.py as below. Thank you for your interest.

MDEDITOR_CONFIGS = {
     'default': {
         'upload_image_url': '/en/mdeditor/uploads/',
         'image_folder': '/blog/editor',
         'language': 'en'
     }
}