GithubHelp home page GithubHelp logo

Comments (4)

Krozark avatar Krozark commented on July 28, 2024 2

I use this configuration (and it work)

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR,"public/static")

MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR,"public/media")

FILE_UPLOAD_PATH = os.path.join(MEDIA_ROOT, 'uploads/')

#FROALA_UPLOAD_PATH = FILE_UPLOAD_PATH

urls.py
import django
from django.conf.urls import url, include
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^froala_editor/', include('froala_editor.urls')),
url(r'^/', include("website.urls")),
]
if settings.DEV:
urlpatterns.append(url(r'^media/(.*)$', django.views.static.serve, {'document_root': settings.MEDIA_ROOT}))

from django-froala-editor.

pieterdd avatar pieterdd commented on July 28, 2024

I'm having the same problem here. The code looks like a work in progress (some lines are commented out for example) and I can't find a view that can resolve URLs of uploaded images, so I'm not sure if it's even supported yet.

from django-froala-editor.

CARocha avatar CARocha commented on July 28, 2024

Hi, i not have problem a put this in my settings.py
this code is for django 1.8.x
MEDIA_ROOT = os.environ.get('MEDIA_ROOT', os.path.join(BASE_DIR, 'media'))
MEDIA_URL = '/media/'
STATIC_ROOT = os.environ.get('STATIC_ROOT', os.path.join(BASE_DIR, 'static'))
STATIC_URL = '/static/'

STATICFILES_DIRS = (
os.path.join(BASE_DIR, "static_media"),
)

FROALA_EDITOR_OPTIONS = {
'language': 'es',

other options

}

it's work well,

but i still the error when browser folder -- managed image -- i don't see any my images uploads :(
any why?

thank

from django-froala-editor.

5parkp1ug avatar 5parkp1ug commented on July 28, 2024

I have a similar problem. When inserting an image, the file gets uploaded to the directory "media" in my app base folder, but it returns error for the uploaded image URL. I have fiddled with MEDIA_ROOT & MEDIA_URL settings but no success. My settings are as below -

MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
MEDIA_URL = 'media/'
FROALA_UPLOAD_PATH = os.path.join(BASE_DIR, 'media')

Here is the log snippet from server --
[14/May/2017 00:26:02] "POST /froala_editor/image_upload/ HTTP/1.1" 200 79
Not Found: /media/home/abhi/Projects/djApp/media/home_search_image_O0noYRJ.jpg
[14/May/2017 00:26:02] "GET /media/home/abhi/Projects/djApp/media/home_search_image_O0noYRJ.jpg HTTP/1.1" 404 1922

from django-froala-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.