summaryrefslogtreecommitdiff
path: root/srv/src/api/tpl/admin-assets.html
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2022-05-17 15:54:20 -0600
committerBrian Picciano <mediocregopher@gmail.com>2022-05-17 15:54:20 -0600
commit69de76cb32cfd638672d4d5846d0659bf102316f (patch)
treefd2a1f9fdd815a70eb514b54dbcacc24b8e402cc /srv/src/api/tpl/admin-assets.html
parente406ad6e7c82592d3bbaa1cf93ffc1612e4f196c (diff)
Add asset file upload form, plus related necessary refactors
Diffstat (limited to 'srv/src/api/tpl/admin-assets.html')
-rw-r--r--srv/src/api/tpl/admin-assets.html26
1 files changed, 25 insertions, 1 deletions
diff --git a/srv/src/api/tpl/admin-assets.html b/srv/src/api/tpl/admin-assets.html
index d871a3e..036002e 100644
--- a/srv/src/api/tpl/admin-assets.html
+++ b/srv/src/api/tpl/admin-assets.html
@@ -1,8 +1,32 @@
{{ define "body" }}
+<h2>Upload Asset</h2>
+
+<p>
+ If the given ID is the same as an existing asset's ID, then that asset will be
+ overwritten.
+</p>
+
+<form action={{ BlogURL "assets" }} method="POST" enctype="multipart/form-data">
+ {{ .CSRFFormInput }}
+ <div class="row">
+ <div class="four columns">
+ <input type="text" placeholder="Unique ID" name="id" />
+ </div>
+ <div class="four columns">
+ <input type="file" name="file" /><br/>
+ </div>
+ <div class="four columns">
+ <input type="submit" value="Upload" />
+ </div>
+ </div>
+</form>
+
+<h2>Existing Assets</h2>
+
<table>
- {{ range .IDs }}
+ {{ range .Payload.IDs }}
<tr>
<td><a href="{{ AssetURL . }}" target="_blank">{{ . }}</a></td>
<td>