diff --git a/README.md b/README.md index 3d0c506..ade7e30 100644 --- a/README.md +++ b/README.md @@ -99,17 +99,6 @@ $ curl -F "file=@x.txt" -H "expire:10min" "" $ curl -F "oneshot=@x.txt" "" ``` -#### 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" "" $ curl -F "remote=https://example.com/file.png" "" ``` +#### 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: