summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJulian Hurst <julian.hurst@digdash.com>2025-01-23 16:09:39 +0100
committerJulian Hurst <julian.hurst@digdash.com>2025-01-23 16:09:39 +0100
commit6ababe78852e5e2398fe5cb125cba7a0c9e6b44e (patch)
tree8a9cb59f54c13ad0000181e1cb365d025b4fa58a /templates
parent634a9911e6828a20ed898aabce1f6302ebcf2f54 (diff)
downloadbox-6ababe78852e5e2398fe5cb125cba7a0c9e6b44e.tar.gz
Add metadata support for specifying the extension
Diffstat (limited to 'templates')
-rw-r--r--templates/index.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/index.html b/templates/index.html
index 3291d8e..0186d89 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -37,7 +37,11 @@
}
}
xhr.open("POST", "/upload", true);
- xhr.setRequestHeader("X-Token", token)
+ xhr.setRequestHeader("X-Token", token);
+ ldot = f.name.lastIndexOf(".");
+ if (ldot > -1) {
+ xhr.setRequestHeader("X-ResourceMeta-Extension", f.name.substring(ldot))
+ }
xhr.send(f)
}
</script>