I am trying to make one Userto download a file (in some language) and another Userto load it so that it can translate it.
I set the media root and media url:
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
When someone uploads a file through form, the file appears in project/media/file. But the problem is that if I try to click a file or type url /project/media/file.extension, it raises
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/media/File_-_Psychos_lZB1D1N.mp3
Using the URLconf defined in SolutionsForLanguages_2.urls, Django tried these URL patterns, in this order:
http://127.0.0.1:8000/media/File_-_Psychos_lZB1D1N.mp3
What to do to make it work?
source
share