Enable submit using web interface

This commit is contained in:
Daan Sprenkels 2019-12-16 09:53:36 +05:30
parent f32e47b4c8
commit 824c6f41e2

View File

@ -1,13 +1,27 @@
{{define "body"}}
<pre>
#RU URL SHORTENER
=================
<h1>#RU paste-dump</h1>
Based on https://0x0.st/, this site allows you to easily shorten URLs using
Based on https://0x0.st/, this site allows you to easily upload files and shorten URLs using
the command line.
## USAGE
<h2>Web-API</h2>
<section>
<form action="/" method="post" enctype="multipart/form-data">
<label class="formLabel" for="fileUploadField">Upload a file:</label>
<input class="formMain" id="fileUploadField" name="file" type="file" />
<input class="formSubmit" id="fileUploadSubmit" type="submit" value="upload!" />
</form>
</section>
<section>
<form action="/" method="post" enctype="multipart/form-data">
<label class="formLabel" for="shortenURLField">Upload a URL:</label>
<input class="formMain" id="shortenURLField" name="shorten" type="url" />
<input class="formSubmit" id="shortenURLSubmit" type="submit" value="shorten!" />
</form>
</section>
<h2>Command line API</h2>
<pre>
# Upload a file
curl -F'file=@yourfile.png' <a href="{{.Host}}">{{.Host}}</a>