I'm trying to make one User
to upload a file (in some language) and another User
to download it so they can translate it.
I've set media root adn media url:
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
When someone uploads a file through form
, the file appeares in project/media/file
. But the problem is that if I try to click on the file or type an 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?