datatrash/template/index.html

94 lines
2.9 KiB
HTML

<!DOCTYPE html>
<html lang="de-DE">
<head>
<title>datatrash</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Temporärer Dateiaustausch" />
<link href="/static/index.css" rel="stylesheet" />
</head>
<body>
<main>
<h1>datatrash</h1>
<form action="/upload" method="POST" enctype="multipart/form-data">
<label for="file-upload">datei{max_size_snippet}</label>
<br />
<input id="file-upload" type="file" name="file" />
<br />
<label for="text-upload">oder asciitrash</label>
<br />
<textarea id="text-upload" name="text" rows="15" cols="120"></textarea>
<br />
<input
id="delete_on_download"
type="checkbox"
name="delete_on_download"
/>
<label for="delete_on_download">nach einem download löschen</label>
<br />
<label for="keep_for">gültig für</label>
<select id="keep_for" name="keep_for">
<option value="1800">30 minuten</option>
<option value="3600">60 minuten</option>
<option value="43200">12 stunden</option>
<option value="86400">24 stunden</option>
<option value="604800">eine woche</option>
<option value="2678400">einen monat</option>
</select>
<br />{auth_snippet}
<input class="main button" type="submit" value="hochladen" />
</form>
<details class="usage">
<summary>nutzung als api</summary>
<p>
<label>datei hochladen</label>
<code
>curl -F 'file=@yourfile.rs'
<span class="origin">&lt;origin&gt;</span>/upload</code
>
</p>
<p>
<label>text hochladen</label>
<code
>curl -F 'text=your text'
<span class="origin">&lt;origin&gt;</span>/upload</code
>
</p>
<p>
<label>zeitbegrenzung setzen</label>
<code
>curl -F 'text=your text' -F 'keep_for=1800'
<span class="origin">&lt;origin&gt;</span>/upload</code
>
</p>
<p>
<label>nach einem download löschen</label>
<code
>curl -F 'text=your text' -F 'delete_on_download=true'
<span class="origin">&lt;origin&gt;</span>/upload</code
>
</p>
<p>
<label>authentifizieren</label>
<code
>curl -F 'text=your text' -F 'password=…'
<span class="origin">&lt;origin&gt;</span>/upload</code
>
</p>
</details>
</main>
<footer>
{abuse}
<a
href="https://git.ctdo.de/neri/datatrash"
target="_blank"
rel="noopener noreferrer"
>
repo
</a>
</footer>
<script src="/static/paste.js"></script>
<script src="/static/origin.js"></script>
</body>
</html>