For working program need xclip
. Install it
sudo apt-get install xclip
Fill credentials to sftp in config.ini
Compile go files go build -o sftp_uploader *.go
or use compiled binaries.
Run:
$ ./sftp_uploader # for upload image from clipboard buffer
$ ./sftp_uploader -r # for upload image from stdin
Example with flameshot:
$ flameshot gui -r | ./sftp_uploader -r