Uploading images to ShotShare using curl



Published: 2024-07-14 13:18:44 +0000
Categories: Misc,

Language

Misc

Description

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

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'

Keywords

curl, misc, shotshare, upload,

Latest Posts


Copyright © 2024 Ben Tasker | Sitemap | Privacy Policy
Available at snippets.bentasker.co.uk, http://phecoopwm6x7azx26ctuqcp6673bbqkrqfeoiz2wwk36sady5tqbdpqd.onion and http://snippets.bentasker.i2p
hit counter github.com/bentasker