Uploading images to ShotShare using curl (Misc)

ShotShare is an OSS image sharing application. It allows users to upload images and creates sharing and embed links

Uploads can be submitted through a web-browser, but there's also an API

This snippet details how to upload an image using curl.

You'll need to have generated an API token under Profile

Details

  • Language: Misc

Snippet

IMG_PATH=/home/ben/Pictures/adblocking_wiki.png
TOK=<your api token>
DOM=<your shotshare domain>

curl -s \
-H "Authorization: Bearer $TOK" \
-H "Accept: application/json" \
-F images[0]=@$IMG_PATH \
https://$DOM/api/upload | jq -r '.data.link'