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]]
|
||||
name = "datatrash"
|
||||
version = "2.2.2"
|
||||
version = "2.3.0"
|
||||
dependencies = [
|
||||
"actix-files",
|
||||
"actix-governor",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "datatrash"
|
||||
version = "2.2.2"
|
||||
version = "2.3.0"
|
||||
authors = ["neri"]
|
||||
edition = "2021"
|
||||
|
||||
|
|
|
@ -157,6 +157,19 @@ a.button:visited {
|
|||
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 {
|
||||
display: inline-block;
|
||||
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>
|
||||
<details class="usage">
|
||||
<summary>nutzung als api</summary>
|
||||
<pre>
|
||||
datei hochladen
|
||||
curl -F 'file=@yourfile.rs' <domain>/upload
|
||||
|
||||
text hochladen
|
||||
curl -F 'text=your text' <domain>/upload
|
||||
|
||||
zeitbegrenzung setzen
|
||||
curl -F 'text=your text' -F 'keep_for=1800' <domain>/upload
|
||||
|
||||
nach einem download löschen
|
||||
curl -F 'text=your text' -F 'delete_on_download=true' <domain>/upload
|
||||
|
||||
authentifizieren
|
||||
curl -F 'text=your text' -F 'password=…' <domain>/upload</pre
|
||||
<p>
|
||||
<label for="upload-file">datei hochladen</label>
|
||||
<code id="upload-file"
|
||||
>curl -F 'file=@yourfile.rs'
|
||||
<span class="origin"><origin></span>/upload</code
|
||||
>
|
||||
</p>
|
||||
<p>
|
||||
<label for="upload-text">text hochladen</label>
|
||||
<code id="upload-text"
|
||||
>curl -F 'text=your text'
|
||||
<span class="origin"><origin></span>/upload</code
|
||||
>
|
||||
</p>
|
||||
<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>
|
||||
</main>
|
||||
<footer>
|
||||
|
@ -69,5 +88,6 @@ authentifizieren
|
|||
</a>
|
||||
</footer>
|
||||
<script src="/static/paste.js"></script>
|
||||
<script src="/static/origin.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue