forked from neri/datatrash
feat: update usage info, include actual origin
This commit is contained in:
parent
bf2e91a2c5
commit
39e72a8eb6
|
@ -424,7 +424,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "datatrash"
|
name = "datatrash"
|
||||||
version = "2.2.2"
|
version = "2.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-files",
|
"actix-files",
|
||||||
"actix-governor",
|
"actix-governor",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "datatrash"
|
name = "datatrash"
|
||||||
version = "2.2.2"
|
version = "2.3.0"
|
||||||
authors = ["neri"]
|
authors = ["neri"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|
|
@ -157,6 +157,19 @@ a.button:visited {
|
||||||
color: var(--fg-light);
|
color: var(--fg-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.usage > p {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.usage > p > label {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.usage > p > code {
|
||||||
|
margin-left: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
.large-link {
|
.large-link {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
const originSpans = document.querySelectorAll(".origin");
|
||||||
|
for (const originSpan of originSpans) {
|
||||||
|
originSpan.textContent = window.location.origin;
|
||||||
|
}
|
|
@ -40,22 +40,41 @@
|
||||||
</form>
|
</form>
|
||||||
<details class="usage">
|
<details class="usage">
|
||||||
<summary>nutzung als api</summary>
|
<summary>nutzung als api</summary>
|
||||||
<pre>
|
<p>
|
||||||
datei hochladen
|
<label for="upload-file">datei hochladen</label>
|
||||||
curl -F 'file=@yourfile.rs' <domain>/upload
|
<code id="upload-file"
|
||||||
|
>curl -F 'file=@yourfile.rs'
|
||||||
text hochladen
|
<span class="origin"><origin></span>/upload</code
|
||||||
curl -F 'text=your text' <domain>/upload
|
>
|
||||||
|
</p>
|
||||||
zeitbegrenzung setzen
|
<p>
|
||||||
curl -F 'text=your text' -F 'keep_for=1800' <domain>/upload
|
<label for="upload-text">text hochladen</label>
|
||||||
|
<code id="upload-text"
|
||||||
nach einem download löschen
|
>curl -F 'text=your text'
|
||||||
curl -F 'text=your text' -F 'delete_on_download=true' <domain>/upload
|
<span class="origin"><origin></span>/upload</code
|
||||||
|
>
|
||||||
authentifizieren
|
</p>
|
||||||
curl -F 'text=your text' -F 'password=…' <domain>/upload</pre
|
<p>
|
||||||
>
|
<label for="upload-with-time">zeitbegrenzung setzen</label>
|
||||||
|
<code id="upload-with-time"
|
||||||
|
>curl -F 'text=your text' -F 'keep_for=1800'
|
||||||
|
<span class="origin"><origin></span>/upload</code
|
||||||
|
>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label for="upload-with-delete">nach einem download löschen</label>
|
||||||
|
<code id="upload-with-delete"
|
||||||
|
>curl -F 'text=your text' -F 'delete_on_download=true'
|
||||||
|
<span class="origin"><origin></span>/upload</code
|
||||||
|
>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label for="upload-with-auth">authentifizieren</label>
|
||||||
|
<code id="upload-with-auth"
|
||||||
|
>curl -F 'text=your text' -F 'password=…'
|
||||||
|
<span class="origin"><origin></span>/upload</code
|
||||||
|
>
|
||||||
|
</p>
|
||||||
</details>
|
</details>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
|
@ -69,5 +88,6 @@ authentifizieren
|
||||||
</a>
|
</a>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="/static/paste.js"></script>
|
<script src="/static/paste.js"></script>
|
||||||
|
<script src="/static/origin.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue