From 09594892f92eec279fbc1e6c2595de63549dd256 Mon Sep 17 00:00:00 2001 From: CodeKevin Date: Mon, 5 Oct 2015 00:35:23 -0400 Subject: [PATCH] Closes #59 --- CTFd/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CTFd/admin.py b/CTFd/admin.py index af2460db..6b68e436 100644 --- a/CTFd/admin.py +++ b/CTFd/admin.py @@ -297,7 +297,7 @@ def admin_files(chalid): os.makedirs(os.path.join(os.path.normpath(app.static_folder), 'uploads', md5hash)) f.save(os.path.join(os.path.normpath(app.static_folder), 'uploads', md5hash, filename)) - db_f = Files(chalid, os.path.join(md5hash, filename)) + db_f = Files(chalid, os.path.join('static', 'uploads', md5hash, filename)) db.session.add(db_f) db.session.commit() @@ -568,7 +568,7 @@ def admin_create_chal(): os.makedirs(os.path.join(os.path.normpath(app.static_folder), 'uploads', md5hash)) f.save(os.path.join(os.path.normpath(app.static_folder), 'uploads', md5hash, filename)) - db_f = Files(chal.id, os.path.join(md5hash, filename)) + db_f = Files(chal.id, os.path.join('static', 'uploads', md5hash, filename)) db.session.add(db_f) db.session.commit()