Browse Source

The upload endpoint moved

Signed-off-by: fbt <fbt@fleshless.org>
master
Jack L. Frost 2 years ago
parent
commit
0dafaaf15b
  1. 18
      ufw

18
ufw

@ -148,26 +148,26 @@ upload() {
-F submit="" \
"${misc_curl_args[@]}" \
-A 'zerofiles.org upload script' \
"$cfg_service_url/$cfg_api_path/upload" )
"$cfg_service_url/maw.json" )
if (( flag_shortlink )); then
if (( flag_directlink )); then
file_url_request='short_url_direct'
else
file_url_request='short_url'
fi
else
if (( flag_directlink )); then
file_url_request='direct_url'
else
file_url_request='page_url'
file_url_request='page_short_url'
fi
else
file_url_request='url'
fi
get_api_status <<< "$api_response"
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"

Loading…
Cancel
Save