datatrash/template/index.html

74 lines
2.3 KiB
HTML
Raw Normal View History

2020-07-09 17:27:24 +00:00
<!DOCTYPE html>
2020-08-03 00:41:36 +00:00
<html lang="de-DE">
2020-07-09 17:27:24 +00:00
<head>
<title>datatrash</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
2020-08-03 00:41:36 +00:00
<meta name="description" content="Temporärer Dateiaustausch" />
2020-07-09 17:27:24 +00:00
<link href="/static/index.css" rel="stylesheet" />
</head>
<body>
<main>
<h1>datatrash</h1>
<form action="/upload" method="POST" enctype="multipart/form-data">
2021-08-18 21:22:50 +00:00
<label for="file-upload">datei{max_size_snippet}</label>
<br />
<input id="file-upload" type="file" name="file" />
2020-07-09 17:27:24 +00:00
<br />
2020-08-03 00:41:36 +00:00
<label for="text-upload">oder asciitrash</label>
2020-07-09 17:27:24 +00:00
<br />
2022-01-29 12:16:04 +00:00
<textarea id="text-upload" name="text" rows="15" cols="120"></textarea>
<br />
<label for="keep_for">gültig für</label>
<select id="keep_for" name="keep_for">
2020-07-09 17:27:24 +00:00
<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>
2020-07-09 17:27:24 +00:00
</select>
<br />
<input
id="delete_on_download"
type="checkbox"
name="delete_on_download"
/>
<label for="delete_on_download">nach einem download löschen</label>
2021-08-18 21:22:50 +00:00
<br />{auth_snippet}
2020-08-03 00:41:36 +00:00
<input class="main button" type="submit" value="hochladen" />
2020-07-09 17:27:24 +00:00
</form>
2021-04-16 12:45:43 +00:00
<details class="usage">
<summary>nutzung als api</summary>
<pre>
2021-08-18 21:22:50 +00:00
datei hochladen
curl -F 'file=@yourfile.rs' &lt;domain&gt;/upload
2021-08-18 21:22:50 +00:00
text hochladen
curl -F 'text=your text' &lt;domain&gt;/upload
2021-08-18 21:22:50 +00:00
zeitbegrenzung setzen
curl -F 'text=your text' -F 'keep_for=1800' &lt;domain&gt;/upload
2021-08-18 21:22:50 +00:00
nach einem download löschen
curl -F 'text=your text' -F 'delete_on_download=true' &lt;domain&gt;/upload
2021-08-18 21:22:50 +00:00
authentifizieren
curl -F 'text=your text' -F 'password=…' &lt;domain&gt;/upload</pre
>
2021-04-16 12:45:43 +00:00
</details>
2020-07-09 17:27:24 +00:00
</main>
<footer>
<a
class="repo"
href="https://repos.ctdo.de/neri/datatrash"
target="_blank"
rel="noopener noreferrer"
>
repo
</a>
</footer>
<script src="/static/paste.js"></script>
2020-07-09 17:27:24 +00:00
</body>
</html>