pylixm/django-mdeditor

İmage upload not working. Please help!

Closed this issue · 2 comments

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

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

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'
     }
}