From 664c4495e0259fd9931f80493f821832c0446e1c Mon Sep 17 00:00:00 2001 From: Daniel Szabo Date: Sat, 8 Jul 2023 21:54:13 +0300 Subject: [PATCH] Fixed pasta creation bug Fixed a bug that caused new uploads not to save their text content if the server had the encryption features turned off --- templates/index.html | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/templates/index.html b/templates/index.html index 329ebef..bcd1425 100644 --- a/templates/index.html +++ b/templates/index.html @@ -146,15 +146,25 @@ @@ -218,7 +228,6 @@ form.onsubmit = async function (event) { event.preventDefault(); // prevent default form submission - // this if is not correct i fink // {% if args.encryption_client_side || args.encryption_server_side %} if (passwordField.value.trim() != "") { if (fileOversized()) return false; @@ -249,7 +258,9 @@ hiddenEncryptedClientSide.name = ""; content.value = contentInput.value; } - // ???? + // {%- else %} + hiddenEncryptedClientSide.name = ""; + content.value = contentInput.value; // {%- endif %} if (contentInput.value.trim() == "" && hiddenFileButton.files.length == 0) { @@ -257,6 +268,7 @@ return false; } + form.submit(); };