-
-
Save yumin9822/47474ad4c37674829adb926a013422d9 to your computer and use it in GitHub Desktop.
Pixhost Upload Shellscript using API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/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