Base64 image uploading to Pasteros

Pasteros now has JPEG handling abilities when pastes are uploaded with base64 data (see commit). Convert your image to base64 like this and view it by add .jpg to the end of the paste ! I also wrote a command line utility that uploads a selected screenshot area to Pasteros.



function uploadImage {
 content=$(cat $1 | base64 -w 0)
 pasteid=$(curl -silent -H "Expect:" -X POST -d $content | tail -1)
 echo "$pasteid.jpg"  | xclip -selection c

DISPLAY=:0.0 scrot -s "shot.jpg" 
uploadImage "shot.jpg"
rm "shot.jpg"
notify-send "Done"