diff options
| author | Julian Hurst <julian.hurst@digdash.com> | 2025-01-23 16:09:39 +0100 |
|---|---|---|
| committer | Julian Hurst <julian.hurst@digdash.com> | 2025-01-23 16:09:39 +0100 |
| commit | 6ababe78852e5e2398fe5cb125cba7a0c9e6b44e (patch) | |
| tree | 8a9cb59f54c13ad0000181e1cb365d025b4fa58a /templates | |
| parent | 634a9911e6828a20ed898aabce1f6302ebcf2f54 (diff) | |
| download | box-6ababe78852e5e2398fe5cb125cba7a0c9e6b44e.tar.gz | |
Add metadata support for specifying the extension
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/index.html | 6 |
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> |
