nasty one

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2026-11-27 21:37:58 +00:00
parent e97bcbc449
commit 7321d054ed
+5 -7
View File
@@ -133,10 +133,6 @@ upload() {
}
fi
if [[ "$album_name" ]]; then
get_album_id "$album_name"
fi
api_response=$( curl \
-F file="@$file" \
-F format='json' \
@@ -193,7 +189,7 @@ get_shortlink() {
get_api_status <<< "$api_response"
if (( api_status == 200 )); then
read -r short_url real_url < <(
read -r short_url < <(
jq -r '.data.short_url' <<< "$api_response"
)
@@ -426,8 +422,6 @@ main() {
shift
fi
TEMPDIR="$cfg_tmp_dir"
case "${action:-upload}" in
upload)
[[ -d "$cfg_tmp_dir" ]] || {
@@ -438,6 +432,10 @@ main() {
}
}
if [[ "$album_name" ]]; then
get_album_id "$album_name"
fi
get_token || return $?
(( ${#args[@]} )) || return 1