Fixed sending of files with specials chars in the filename. Fixes #18.

This commit is contained in:
Fabian Schlenz 2020-11-25 18:12:38 +01:00
parent 2614e0cf44
commit 548a73de46
1 changed files with 2 additions and 2 deletions

View File

@ -385,12 +385,12 @@ fi
if [ -n "$DOCUMENT_FILE" ]; then
check_file "$DOCUMENT_FILE"
CURL_OPTIONS="$CURL_OPTIONS --form document=@$DOCUMENT_FILE"
CURL_OPTIONS="$CURL_OPTIONS --form document=@\"$DOCUMENT_FILE\""
CURL_OPTIONS="$CURL_OPTIONS --form caption=<-"
METHOD="sendDocument"
elif [ -n "$IMAGE_FILE" ]; then
check_file "$IMAGE_FILE"
CURL_OPTIONS="$CURL_OPTIONS --form photo=@$IMAGE_FILE"
CURL_OPTIONS="$CURL_OPTIONS --form photo=@\"$IMAGE_FILE\""
CURL_OPTIONS="$CURL_OPTIONS --form caption=<-"
METHOD="sendPhoto"
else