Compare commits

..

2 Commits

Author SHA1 Message Date
neri 8ca0a9cdee update screenshot 2022-01-29 13:21:00 +01:00
neri 7f650fa89c center the website 2022-01-29 13:16:04 +01:00
5 changed files with 4 additions and 75 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/target /target
/files /files
/static/index.html

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -31,7 +31,7 @@ body {
main { main {
color: var(--fg); color: var(--fg);
width: 100%; width: 100%;
max-width: 1200px; max-width: 1000px;
margin: 0 auto; margin: 0 auto;
padding: 1rem; padding: 1rem;
} }
@ -88,6 +88,7 @@ a:focus-within {
} }
textarea { textarea {
width: 100%;
height: 30vh; height: 30vh;
} }

View File

@ -1,73 +0,0 @@
<!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 (maximal 8MiB)
</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" cols="120"></textarea>
<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 />
<input
id="delete_on_download"
type="checkbox"
name="delete_on_download"
/>
<label for="delete_on_download">nach einem download löschen</label>
<br />
<input class="main button" type="submit" value="hochladen" />
</form>
<details class="usage">
<summary>nutzung als api</summary>
<pre>
datei hochladen
curl -F 'file=@yourfile.rs' &lt;domain&gt;/upload
text hochladen
curl -F 'text=your text' &lt;domain&gt;/upload
zeitbegrenzung setzen
curl -F 'text=your text' -F 'keep_for=1800' &lt;domain&gt;/upload
nach einem download löschen
curl -F 'text=your text' -F 'delete_on_download=true' &lt;domain&gt;/upload
authentifizieren
curl -F 'text=your text' -F 'password=…' &lt;domain&gt;/upload</pre
>
</details>
</main>
<footer>
<a
class="repo"
href="https://repos.ctdo.de/neri/datatrash"
target="_blank"
rel="noopener noreferrer"
>
repo
</a>
</footer>
</body>
</html>

View File

@ -17,7 +17,7 @@
<br /> <br />
<label for="text-upload">oder asciitrash</label> <label for="text-upload">oder asciitrash</label>
<br /> <br />
<textarea id="text-upload" name="text" cols="120"></textarea> <textarea id="text-upload" name="text" rows="15" cols="120"></textarea>
<br /> <br />
<label for="keep_for">gültig für</label> <label for="keep_for">gültig für</label>
<select id="keep_for" name="keep_for"> <select id="keep_for" name="keep_for">