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