From 5d35497f0c10acd81cd23bf9289a56c2f689eca1 Mon Sep 17 00:00:00 2001 From: Owlz Date: Sat, 15 Jul 2017 18:01:22 -0400 Subject: [PATCH] Environment var for UPLOAD_FOLDER (#314) It would be helpful to have the option to set the UPLOAD_FOLDER via environment variable. This change allows that. --- CTFd/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CTFd/config.py b/CTFd/config.py index cbfbcb79..7a7591eb 100644 --- a/CTFd/config.py +++ b/CTFd/config.py @@ -77,7 +77,7 @@ class Config(object): The default destination is the CTFd/uploads folder. If you need Amazon S3 files you can use the CTFd S3 plugin: https://github.com/ColdHeat/CTFd-S3-plugin ''' - UPLOAD_FOLDER = os.path.join(os.path.dirname(__file__), 'uploads') + UPLOAD_FOLDER = os.environ.get('UPLOAD_FOLDER') or os.path.join(os.path.dirname(__file__), 'uploads') ''' TEMPLATES_AUTO_RELOAD specifies whether Flask should check for modifications to templates and