From d416e67d4dcdec83597f4aa151773714bef7c072 Mon Sep 17 00:00:00 2001 From: Marco Dengel Date: Wed, 25 Dec 2024 23:15:19 +0100 Subject: [PATCH] fix: file upload for batch processing of multiple folders --- audio2tonie.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audio2tonie.sh b/audio2tonie.sh index 025a31f..b0b247f 100755 --- a/audio2tonie.sh +++ b/audio2tonie.sh @@ -61,7 +61,7 @@ else echo "Created $OUTPUT_FILE with $count chapter(s)." if [ "$TEDDYCLOUD_IP" ]; then echo -n "Uploading file to Teddycloud..." - response_code=$(curl -s -o /dev/null -F "file=@$OUTPUT_FILE" -w "%{http_code}" "http://$TEDDYCLOUD_IP/api/fileUpload?path=&special=library") + response_code=$(curl -s -o /dev/null -F "file=@$SOURCE/$OUTPUT_FILE" -w "%{http_code}" "http://$TEDDYCLOUD_IP/api/fileUpload?path=&special=library") if [ "${response_code}" != 200 ]; then echo "Error trying to upload to Teddycloud." else @@ -88,7 +88,7 @@ if [ "$TEDDYCLOUD_IP" ]; then echo -n "Uploading file to Teddycloud..." response_code=$(curl -s -o /dev/null -F "file=@$OUTPUT_FILE" -w "%{http_code}" "http://$TEDDYCLOUD_IP/api/fileUpload?path=&special=library") if [ "${response_code}" != 200 ]; then - echo "Error trying to upload to Teddycloud." + echo "Error! Upload didn't succeed." else echo ": OK" fi