7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-06-08 17:02:19 +00:00

Fix download of user-uploaded media

Nginx volumes for downloading user-uploaded files has been accidentally
removed at some point.

Close #139
This commit is contained in:
root 2019-01-26 15:51:00 -03:00 committed by Régis Behmo
parent deeb475428
commit 5a34a1191a
3 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,6 @@
# Changelog
- 2019-01-27 [Bugfix] Fix video transcript/srt upload and download of user-uploaded files. Thanks @dannielariola!
- 2019-01-20 [Improvement] Make it easy to load custom settings for the local production install
- 2019-01-16 [Improvement] Switch license from MIT to AGPL
- 2019-01-04 [Bugfix] Fix xqueue consumer command

View File

@ -52,6 +52,8 @@ services:
volumes:
- ../env/nginx:/etc/nginx/conf.d/
- ../../data/openedx:/var/www/openedx:ro
- ../../data/cms:/openedx/data/cms/:ro
- ../../data/lms:/openedx/data/lms/:ro
- ../../data/letsencrypt:/etc/letsencrypt/:ro
depends_on:
- lms

View File

@ -42,6 +42,12 @@ server {
try_files $uri @proxy_to_cms_app;
}
location ~ ^/media/(?P<file>.*) {
root /openedx/data/cms/uploads;
try_files /$file =404;
expires 31536000s;
}
location ~ ^/static/(?P<file>.*) {
root /var/www/openedx;
try_files /staticfiles/$file /course_static/$file =404;