Closed angonz closed 6 months ago
I've created PR #70
Hi @angonz, let me know what kind of content you were trying to upload and from where you were uploading it. And it wasn't working for you before? Can you please attach some screenshot for the better understanding and tell the steps to reproduce this issue and its fix.
Hi @Faraz32123,
We ran tutor k8s exec discovery ./manage.py refresh_course_metadata --partner_code=openedx
and tutor k8s exec discovery ./manage.py download_course_images --overwrite
. We can see that the files are created in /openedx/discovery/course_discovery/media/
inside the discovery container. However they are not served in the <discovery host>/media/...
url. After patching the container (just adding the /openedx/discovery/course_discovery/media
directory at build time) it started to work as expected.
Closing this issue as completed by #70.
Media files located at
/openedx/discovery/course_discovery/media
are not served. Any attempt to open<discovery host>/media/...
returns 404 Not Found error, even if the file exists in the correct directory.The problem seems to be that the
media
directory does not exists in/openedx/discovery/course_discovery/
in a fresh new container whenuwsgi
is launched. Then the--static-map /media=/openedx/discovery/course_discovery/media
option does not create the mapping, even if the directory is created afterwards.I have tested adding
RUN mkdir course_discovery/media
to the Dockerfile and it seems to fix the problem.