image support for nc-share.sh

This commit is contained in:
Niklas 2021-03-07 01:14:36 +01:00
parent 425e4f2bdc
commit 9b357d7d82

View File

@ -16,10 +16,11 @@ fi
FILENAME=$(basename $FILE_PATH) FILENAME=$(basename $FILE_PATH)
if file -i -b "$FILENAME" | grep "text" &> /dev/null; then if file -i -b "$FILENAME" | grep "text" &> /dev/null; then
$SCRIPTPATH/nc-share-text.sh "$FILENAME" $SCRIPTPATH/nc-share-text.sh "$FILENAME"
else elif file -i -b "$FILENAME" | grep "image" &> /dev/null; then
$SCRIPTPATH/nc-share-file.sh "$FILENAME" | awk '{print $1"/preview"}'
else
$SCRIPTPATH/nc-share-file.sh "$FILENAME" $SCRIPTPATH/nc-share-file.sh "$FILENAME"
fi fi