diff --git a/.gitignore b/.gitignore index ffb4c26..f8446a7 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ modules-tests.sh openIMIS/locale/en/LC_MESSAGES/django.mo **/staticfiles extracted_translations_fe +openIMIS/file_storage diff --git a/openIMIS/openIMIS/settings.py b/openIMIS/openIMIS/settings.py index a4136ba..105118b 100644 --- a/openIMIS/openIMIS/settings.py +++ b/openIMIS/openIMIS/settings.py @@ -484,3 +484,16 @@ def SITE_URL(): 'timeout': 120, } } + +MEDIA_URL = "/file_storage/" +MEDIA_ROOT = os.path.join(BASE_DIR, "file_storage/") + +STORAGES = { + "default": { + "class": "core.filesystem.storage.FileSystemStorage", + "options": { + "location": MEDIA_URL, + "base_url": MEDIA_URL + }, + } +}