Skip to content

Instantly share code, notes, and snippets.

@yumin9822
Forked from floshodan/img_upload.sh
Last active March 28, 2025 02:00
Show Gist options
  • Save yumin9822/47474ad4c37674829adb926a013422d9 to your computer and use it in GitHub Desktop.
Save yumin9822/47474ad4c37674829adb926a013422d9 to your computer and use it in GitHub Desktop.
Pixhost Upload Shellscript using API
#/bin/sh
image=$(find -name "*.png")
export image
varCurl=$(curl -b --include "https://api.pixhost.to/images" \
-H 'Content-Type: multipart/form-data; charset=utf-8' \
-H 'Accept: application/json' \
-F "img=@$image" \
-F 'content_type=1' \
-F 'max_th_size=350' )
var1=$(echo $varCurl | jq -r '.show_url')
var2=$(echo $varCurl | jq -r '.th_url')
echo [url=$var1][img]$var2[/img][/url]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment