froala / django-froala-editor

Package to integrate Froala WYSIWYG HTML rich text editor with Django.
https://froala.com/wysiwyg-editor
283 stars 72 forks source link

Image upload not working #81

Open GovardhanCel opened 4 years ago

GovardhanCel commented 4 years ago

Description Image upload is not working with Django virtual enviormnent setup using the guide https://tutorial.djangogirls.org/en/django_installation/

Expected behavior. Image upload should work.

Actual behavior. Image upload is not working, gives error 'Image cannot be loadded from passed link'.

Editor version. Latest (version 3.1)

Additional resources PLUGIN-Python-Django-Froala

Related issue https://github.com/froala-labs/froala-editor-js-2/issues/1900

2ik commented 4 years ago

You most likely need to create a folder media

You can use FROALA_UPLOAD_PATH setting in settings.py to change the path where uploaded files are stored within the MEDIA_ROOT. By default, uploads/froala_editor/images is used for storing uploaded images.

souledone commented 3 years ago

I am also facing this issue as @2ik said, I have created a media folder and the uploads are successful but the following error occurs.

 "POST /app/froala_editor/image_upload/ HTTP/1.1" 200 139
Not Found: ./app/media/image.png
"GET ./app/media/image.png HTTP/1.1" 404 2482

I am able to find the uploaded imagesin the folder i have given in settings.py but still can't post the image there.

vid_modified

anishrestha1 commented 2 years ago

Hey, I had the same problem with uploading image in the "froala_editor". I just added static path in urls.py and solved the problem. Here is the image.

In coreapp urls.py image

icedogas commented 1 year ago

Hey, I had the same problem with uploading image in the "froala_editor". I just added static path in urls.py and solved the problem. Here is the image.

In coreapp urls.py image

thx,

+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

it works!