Skip to content

Commit

Permalink
Fix serving local files, fixes #26, #27
Browse files Browse the repository at this point in the history
  • Loading branch information
RDMurray committed Feb 16, 2024
1 parent 9727493 commit 578ae09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/backend/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]

# Serve user file uploads
if os.environ.get('ENV') == 'local':
if settings.MEDIA_URL and settings.MEDIA_ROOT :
# In a local environment, this is used for storing and serving user file uploads.
urlpatterns.extend(static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT))
else:
Expand Down

0 comments on commit 578ae09

Please sign in to comment.