album
This commit is contained in:
parent
ef3cd20dfc
commit
3fe0d59815
13
ufw
13
ufw
|
@ -110,10 +110,6 @@ upload() {
|
||||||
|
|
||||||
get_file_hash "$file"
|
get_file_hash "$file"
|
||||||
|
|
||||||
file_url=$( curl -fsL "${cfg_service_url}/api?mode=file&file=${file_hash}&direct=1&short=${flag_shortlink}" )
|
|
||||||
if ! (( $? )); then
|
|
||||||
printf '%s\n' "$file_url"
|
|
||||||
else
|
|
||||||
curl -sL \
|
curl -sL \
|
||||||
-F file="@$file" \
|
-F file="@$file" \
|
||||||
-F upload_mode='api' \
|
-F upload_mode='api' \
|
||||||
|
@ -124,7 +120,7 @@ upload() {
|
||||||
"${misc_curl_args[@]}" \
|
"${misc_curl_args[@]}" \
|
||||||
-A 'zerofiles.org upload script' \
|
-A 'zerofiles.org upload script' \
|
||||||
"$cfg_service_url/upload"
|
"$cfg_service_url/upload"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( $? )); then
|
if (( $? )); then
|
||||||
err 'Something has gone wrong with the upload.'
|
err 'Something has gone wrong with the upload.'
|
||||||
|
@ -278,8 +274,13 @@ main() {
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
-A|--album-name)
|
||||||
|
misc_curl_args+=( -F "album_name=$2" )
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
-d|--description)
|
-d|--description)
|
||||||
misc_curl_args+=( -F "description=$description" )
|
misc_curl_args+=( -F "description=$2" )
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user