- #!/usr/bin/env sh
-
-
-
-
-
-
-
-
-
- if ! [ -z "$1" ] && [ -s "$1" ]; then
- if [ "$(mimetype --output-format %m "$1" | awk -F '/' '{print $1}')" = "text" ]; then
- curl -F "f:1=@$1" ix.io
- else
-
- curl -s -F "file=@$1" https://file.io/?expires=1w | jq '.link' | tr -d '"'
-
-
-
- fi
- else
- printf "empty file!"
- fi
-
- read -r _
|