diff options
Diffstat (limited to 'templates/wormhole.html.template')
| -rw-r--r-- | templates/wormhole.html.template | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/templates/wormhole.html.template b/templates/wormhole.html.template new file mode 100644 index 0000000..4d67a98 --- /dev/null +++ b/templates/wormhole.html.template @@ -0,0 +1,19 @@ +{{define "head"}} + <script src="/static/htmx.min.js"></script> + <script src="/static/htmx-ext-sse.js"></script> + <title>Wormhole</title> +{{end}} + +<div + hx-ext="sse" + sse-connect="/wormhole/{{.Hole}}/ready"> + <form + hx-post="/wormhole/{{.Hole}}" + hx-trigger="sse:ready" + enctype="multipart/form-data"> + <label for="file-input">1. Choose file</label> + <input id="file-input" type="file" name="file"> + </form> +</div> + +<p>2. Visit this URL <a href="{{.Self}}/wormhole/{{.Hole}}">{{.Self}}/wormhole/{{.Hole}}</a></p> |
