diff --git a/upload.sh b/upload.sh index b71318a..f06b2cd 100755 --- a/upload.sh +++ b/upload.sh @@ -14,8 +14,8 @@ _upload_html() { fi for f in $@;do remote_path=${f:1} - echo curl -H "auth" -F "$remote_path=@$f" $url/api/upload - curl -H "$auth" -F "$remote_path=@$f" $url/api/upload > /dev/null + echo curl -s -o /dev/null -w '%{http_code}' -H "auth" -F "$remote_path=@$f" $url/api/upload + curl -s -o /dev/null -w '%{http_code}' -H "auth" -F "$remote_path=@$f" $url/api/upload done } @@ -26,8 +26,8 @@ _upload_media() { for f in $@;do remote_path=${f:1} - echo curl -H "auth" -F "$remote_path=@$f" $url/api/upload - curl -H "$auth" -F "$remote_path=@$f" $url/api/upload + echo curl -s -o /dev/null -w '%{http_code}' -H "auth" -F "$remote_path=@$f" $url/api/upload + curl -s -o /dev/null -w '%{http_code}' -H "auth" -F "$remote_path=@$f" $url/api/upload done }