docs(readme): reorder sections in README.md

This commit is contained in:
Orhun Parmaksız 2022-03-17 11:53:16 +03:00
parent 2d5c14a6e0
commit 51d6fdd0d8
No known key found for this signature in database
GPG Key ID: F83424824B3E4B90
1 changed files with 11 additions and 11 deletions

View File

@ -99,17 +99,6 @@ $ curl -F "file=@x.txt" -H "expire:10min" "<server_address>"
$ curl -F "oneshot=@x.txt" "<server_address>"
```
#### Cleaning up expired files
```sh
#!/bin/env sh
now=$(date +%s)
find upload/ -maxdepth 2 -type f -iname "*.[0-9]*" |
while read -r filename; do
[ "$(( ${filename##*.} / 1000 - "${now}" ))" -lt 0 ] && rm -v "${filename}"
done
```
#### URL shortening
```sh
@ -122,6 +111,17 @@ $ curl -F "url=https://example.com/some/long/url" "<server_address>"
$ curl -F "remote=https://example.com/file.png" "<server_address>"
```
#### Cleaning up expired files
```sh
#!/bin/env sh
now=$(date +%s)
find upload/ -maxdepth 2 -type f -iname "*.[0-9]*" |
while read -r filename; do
[ "$(( ${filename##*.} / 1000 - "${now}" ))" -lt 0 ] && rm -v "${filename}"
done
```
### Server
To start the server: