summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/index.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/index.html b/templates/index.html
index 97f5eca..bafd7eb 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -5,7 +5,12 @@
<title>box</title>
<script>
function upload() {
- token = document.getElementById("token").value
+ token = document.getElementById("token");
+ if (token == null) {
+ token = "";
+ } else {
+ token = token.value;
+ }
f = document.getElementById("file").files[0];
const xhr = new XMLHttpRequest();
xhr.upload.addEventListener("progress", (e) => {