The upload endpoint moved

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
Jack L. Frost 2019-11-23 07:18:51 +03:00
parent 466050972d
commit 0dafaaf15b

18
ufw
View File

@ -148,26 +148,26 @@ upload() {
-F submit="" \ -F submit="" \
"${misc_curl_args[@]}" \ "${misc_curl_args[@]}" \
-A 'zerofiles.org upload script' \ -A 'zerofiles.org upload script' \
"$cfg_service_url/$cfg_api_path/upload" ) "$cfg_service_url/maw.json" )
if (( flag_shortlink )); then if (( flag_shortlink )); then
if (( flag_directlink )); then if (( flag_directlink )); then
file_url_request='short_url_direct'
else
file_url_request='short_url' file_url_request='short_url'
else
file_url_request='page_short_url'
fi fi
else else
if (( flag_directlink )); then file_url_request='url'
file_url_request='direct_url'
else
file_url_request='page_url'
fi
fi fi
get_api_status <<< "$api_response" get_api_status <<< "$api_response"
if (( api_status == 200 )); then if (( api_status == 200 )); then
file_link=$( jshon -e data -e file -e "$file_url_request" -u <<< "$api_response" ) file_link=$( jshon -e data -e "$file_url_request" -u <<< "$api_response" )
(( flag_shortlink )) || {
(( flag_directlink )) || file_link="${file_link#*.}"
}
printf '%s\n' "$file_link" printf '%s\n' "$file_link"