I’ve made a simple user profile editor for a django project. And it has the ability to let the user upload an avatar image.
The thing is i can’t access the image file, using
http://127.0.0.1:8080/media/avatars/filename.png
i think i have set media_root and media_url set correctly:
MEDIA_ROOT = 'C:/<path>/<to>/<media>/media/'
MEDIA_URL = '/media/'
The images gets uploaded correctly in the correct folder (‘avatars’), but django appears not to serve them (or anything) at the media url.
What am i missing?
did you put the something like this in the urls.py