mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 05:54:19 +01:00
@@ -110,7 +110,7 @@ def import_ctf():
|
||||
def export_ctf():
|
||||
backup = export_ctf_util()
|
||||
ctf_name = ctf_config.ctf_name()
|
||||
day = datetime.datetime.now().strftime("%Y-%m-%d")
|
||||
day = datetime.datetime.now().strftime("%Y-%m-%d_%T")
|
||||
full_name = u"{}.{}.zip".format(ctf_name, day)
|
||||
return send_file(
|
||||
backup, cache_timeout=-1, as_attachment=True, attachment_filename=full_name
|
||||
|
||||
@@ -61,7 +61,7 @@ def export_ctf(path=None):
|
||||
shutil.copyfileobj(backup, target)
|
||||
else:
|
||||
name = ctf_name()
|
||||
day = datetime.datetime.now().strftime("%Y-%m-%d")
|
||||
day = datetime.datetime.now().strftime("%Y-%m-%d_%T")
|
||||
full_name = f"{name}.{day}.zip"
|
||||
|
||||
with open(full_name, "wb") as target:
|
||||
|
||||
Reference in New Issue
Block a user