Update receive_mode.py

This commit is contained in:
whew 2021-05-13 08:13:43 +00:00 committed by GitHub
parent 020e9a6a5a
commit 986a9a09a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,16 +82,13 @@ class ReceiveModeWeb:
)
self.web.add_request(self.web.REQUEST_LOAD, request.path)
r = make_response(
render_template(
"receive.html",
static_url_path=self.web.static_url_path,
disable_text=self.web.settings.get("receive", "disable_text"),
disable_files=self.web.settings.get("receive", "disable_files"),
title=self.web.settings.get("general", "title"),
)
return render_template(
"receive.html",
static_url_path=self.web.static_url_path,
disable_text=self.web.settings.get("receive", "disable_text"),
disable_files=self.web.settings.get("receive", "disable_files"),
title=self.web.settings.get("general", "title")
)
return self.web.add_security_headers(r)
@self.web.app.route("/upload", methods=["POST"])
def upload(ajax=False):
@ -218,12 +215,11 @@ class ReceiveModeWeb:
)
else:
# It was the last upload and the timer ran out
r = make_response(
return make_response(
render_template("thankyou.html"),
static_url_path=self.web.static_url_path,
title=self.web.settings.get("general", "title"),
)
return self.web.add_security_headers(r)
@self.web.app.route("/upload-ajax", methods=["POST"])
def upload_ajax_public():