[GH-ISSUE #114] Uploading images directly using curl #88

Closed
opened 2026-02-25 23:40:39 +03:00 by kerem · 2 comments
Owner

Originally created by @hisacro on GitHub (Apr 29, 2020).
Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/114

I cannot seem to find any resource to do this on pictshare.net..
uploading directly from command line and get the link
curl -F 'image=??' pictshare.net < image_file

I find it really useful as I always rely on these
curl -F 'sprunge=<-' sprunge.us
curl -F 'f:1=<-' ix.io

pointing to any resource on how to do that will be much appreciated.

Originally created by @hisacro on GitHub (Apr 29, 2020). Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/114 I cannot seem to find any resource to do this on pictshare.net.. uploading directly from command line and get the link `curl -F 'image=??' pictshare.net < image_file` I find it really useful as I always rely on these `curl -F 'sprunge=<-' sprunge.us` `curl -F 'f:1=<-' ix.io` pointing to any resource on how to do that will be much appreciated.
kerem closed this issue 2026-02-25 23:40:39 +03:00
Author
Owner

@geek-at commented on GitHub (Apr 29, 2020):

you can find the curl upload command here

<!-- gh-comment-id:621447421 --> @geek-at commented on GitHub (Apr 29, 2020): you can find the curl upload command [here](https://github.com/HaschekSolutions/pictshare/blob/master/rtfm/INTEGRATIONS.md#upload-from-cli)
Author
Owner

@hisacro commented on GitHub (Apr 30, 2020):

adding this just in case if any one don't want to use jq..
define this function in .bashrc

pictshare(){
curl -s -F "file=@-" https://pictshare.net/api/upload.php  |  sed -e 's/,/\n/g; s/\\//g; s/\"/ /g' | grep url | column -t
}

usage


pictshare < file.png        # uploading files
import png:- | pictshare    # uploading screenshots using imagemagick's import 

output will be

url         :  https://pictshare.net/xxx
delete_url  :  https://pictshare.net/delete_xxxx 

if the terminal emulator is set to recognize links then clicking can open it in browser.

<!-- gh-comment-id:621633199 --> @hisacro commented on GitHub (Apr 30, 2020): adding this just in case if any one don't want to use jq.. define this function in .bashrc ``` pictshare(){ curl -s -F "file=@-" https://pictshare.net/api/upload.php | sed -e 's/,/\n/g; s/\\//g; s/\"/ /g' | grep url | column -t } ``` usage ``` pictshare < file.png # uploading files import png:- | pictshare # uploading screenshots using imagemagick's import ``` output will be ``` url : https://pictshare.net/xxx delete_url : https://pictshare.net/delete_xxxx ``` if the terminal emulator is set to recognize links then clicking can open it in browser.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pictshare#88
No description provided.