Skip to content

Commit

Permalink
Fix download of user-uploaded media
Browse files Browse the repository at this point in the history
Nginx volumes for downloading user-uploaded files has been accidentally
removed at some point.

Close #139
  • Loading branch information
root authored and regisb committed Jan 27, 2019
1 parent deeb475 commit 5a34a11
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions deploy/local/templates/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions deploy/templates/nginx/cms.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5a34a11

Please sign in to comment.