From 57d2862621479a8a0c62d9f19be52d065891e1e5 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sun, 2 Oct 2022 08:51:20 +0000 Subject: [PATCH] Fix spaces in url for curl upload --- upload.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/upload.sh b/upload.sh index 618ec0f..ad71278 100644 --- a/upload.sh +++ b/upload.sh @@ -2,5 +2,6 @@ for FILE in output/epubs/* do - curl -Ss -u "${USERNAME}":"${PASSWORD}" -T "${FILE}" "https://cloud.crystalyx.net/remote.php/dav/files/${USERNAME}/Public/TWI/${FILE##*/}" + FILE_URL=$(sed "s/ /%20/g" <<< "${FILE##*/}") + curl -Ss -u "${USERNAME}":"${PASSWORD}" -T "${FILE}" "https://cloud.crystalyx.net/remote.php/dav/files/${USERNAME}/Public/TWI/${FILE_URL}" done