A
A
AlexBoss2018-10-18 07:11:19
Django
AlexBoss, 2018-10-18 07:11:19

What's wrong with django2.1 access to add images?

When adding a file, this miracle comes out of the form every time, I've already
tried everything
.
/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static/')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
MEDIA_URL = "/media/"
worth gunicron if it's important
added to urls.py urlpatterns = [...]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
latush, 2018-10-18
@latush

1) from what user the application is launched?
2) owner and permissions on /home/django/django/media ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question