Simplified the FTP upload hook
This commit is contained in:
parent
e9adf1a7ed
commit
6cecb7c239
2 changed files with 4 additions and 14 deletions
|
@ -35,7 +35,7 @@ post_file() {
|
|||
|
||||
# -f is needed to make curl fail if there's an HTTP error code
|
||||
# -L is needed to follow redirects! (just in case)
|
||||
until curl -fL --max-time 30 $url -u $api_key":" -X POST -F "file=@${file_path}" -F "full_path=${file_path}"
|
||||
until curl -fL --max-time 30 $url -u $api_key":" -X POST -F "file=@${file_path}"
|
||||
do
|
||||
retry_count=$[$retry_count+1]
|
||||
if [ $retry_count -ge $max_retry ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue