by geoka9 · 2y ago · 0 comments
#!/bin/bash
set -e
dbus-update-activation-environment DISPLAY XAUTHORITY
FNAME=`cat /dev/urandom | tr -cd 'a-f0-9' | head -c 32`.png
flameshot gui --raw > /tmp/$FNAME
~/go/bin/mc -q cp --attr x-amz-acl=public-read /tmp/$FNAME s3/your.s3.bucket/dir/$FNAME
echo -n https://s3-us-west-2.amazonaws.com/your.s3.bucket/dir/$FNAME | xsel
[0] https://min.io/docs/minio/linux/reference/minio-mc.html $ publish example.png
https://example.com/+umk3cm5cah5akbqeueq8914zimfktoih
And for when it matters, the filename can optionally be attached: $ publish --named example.png
https://example.com/+umk3cm5cah5akbqeueq8914zimfktoih
$ http --headers 'https://example.com/+umk3cm5cah5akbqeueq8914zimfktoih' | grep 'Content-Disposition'
Content-Disposition: inline; filename="example.png"