aboutsummaryrefslogtreecommitdiff
path: root/app/utils.py
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-01-18 01:38:00 +0000
committerrubenwardy <rw@rubenwardy.com>2020-01-18 01:38:00 +0000
commit077bdeb01c5725344d871705f2bd97df4ff96bef (patch)
treea86491032501d23c3ac1a6bafa54730357a158ff /app/utils.py
parent095494f96f00b33dc9e956b094105c49b5bc558b (diff)
downloadcheatdb-077bdeb01c5725344d871705f2bd97df4ff96bef.tar.xz
Add reloading support to Docker container
Diffstat (limited to 'app/utils.py')
-rw-r--r--app/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/utils.py b/app/utils.py
index 5d1c8da..983111c 100644
--- a/app/utils.py
+++ b/app/utils.py
@@ -46,13 +46,13 @@ def randomString(n):
return ''.join(random.choice(string.ascii_lowercase + \
string.ascii_uppercase + string.digits) for _ in range(n))
-assert(os.path.isdir(app.config["UPLOAD_DIR"]), "UPLOAD_DIR must exist")
-
def doFileUpload(file, fileType, fileTypeDesc):
if not file or file is None or file.filename == "":
flash("No selected file", "error")
return None
+ assert os.path.isdir(app.config["UPLOAD_DIR"]), "UPLOAD_DIR must exist"
+
allowedExtensions = []
isImage = False
if fileType == "image":