summaryrefslogtreecommitdiff
path: root/root.template
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2020-09-10 23:20:25 +0200
committerJulian T <julian@jtle.dk>2020-09-10 23:20:25 +0200
commit5af37b83f0204bb43218547defbf7c6c817986a6 (patch)
tree6ad8348b6dff590b19587414accecf738ce85704 /root.template
parent141f9617e4ccf54d8ab611fb1d1f57d9a42e5dbd (diff)
Root can be set in config
Diffstat (limited to 'root.template')
-rw-r--r--root.template4
1 files changed, 2 insertions, 2 deletions
diff --git a/root.template b/root.template
index 74fbc0c..616d0b2 100644
--- a/root.template
+++ b/root.template
@@ -46,7 +46,7 @@
<label for="doupload">Vis upload</label>
<input type="checkbox" id="doupload">
<div id="upload-box">
- <form method="POST" action="/upload" enctype="multipart/form-data">
+ <form method="POST" action="{{ .Root }}/upload" enctype="multipart/form-data">
<input type="input" name="h">
<input type="file" name="f" accept="image/*,.pdf,.txt,.md" capture>
<input type="submit" value="go">
@@ -124,7 +124,7 @@
<td>{{ .Name }}</td>
{{ $files := index $.Files .Hash }}
<td>{{ range $i, $f := $files }}
- <a href="/data/{{$f}}">[{{ $i }}] </a>
+ <a href="{{ $.Root }}/data/{{$f}}">[{{ $i }}] </a>
{{ end }}</td>
</tr>
{{ end }}