| ringtone | Create a variable bitrate mp3 ringtone from file | sh | date, ffmpeg |
| splitjoin | Split file or join selection | sh | split, cat |
| suedit | Edit file using superuser permissions | sh | sudoedit/sudo/doas |
-| transfer | Upload file to transfer.sh | sh | curl |
| treeview | Informative tree output in `$EDITOR` | sh | tree |
| uidgid | List user and group of all files in dir | sh | ls, less |
| upgrade | Upgrade nnn manually on Debian 9 Stretch | sh | curl |
+| upload | Upload file to file.io | sh | curl, jq, tr |
| vidthumb | Show video thumbnails in terminal | sh | [ffmpegthumbnailer](https://github.com/dirkvdb/ffmpegthumbnailer),<br>[lsix](https://github.com/hackerb9/lsix) |
| wall | Set wallpaper or change colorscheme | sh | nitrogen/pywal |
+++ /dev/null
-#!/usr/bin/env sh
-
-# Description: Upload a file to transfer.sh
-#
-# Shell: POSIX compliant
-# Author: Arun Prakash Jana
-
-if ! [ -z "$1" ]; then
- # Upload the file, show the download link and wait till user presses any key
- curl -s --upload-file "$1" https://transfer.sh/"$(basename "$1")"
- echo
- read -r _
-
- # To write download link to "$1".loc and exit
- # curl -s --upload-file "$1" https://transfer.sh/`basename "$1"` -o `basename "$1"`.loc
-fi
--- /dev/null
+#!/usr/bin/env sh
+
+# Description: Upload a file to file.io
+# Requires: curl, jq, tr
+# Note: File set to expire after a week
+#
+# Shell: POSIX compliant
+# Author: Arun Prakash Jana
+
+if [ -s "$1" ]; then
+ # Upload the file, show the download link and wait till user presses any key
+ curl -s -F "file=@$1" https://file.io/?expires=1w | jq '.link' | tr -d '"'
+
+ # To write download link to "$1".loc and exit
+ # curl -s -F "file=@$1" https://file.io/?expires=1w -o `basename "$1"`.loc
+else
+ echo "empty file!"
+fi
+ read -r _