Skip to content

Instantly share code, notes, and snippets.

@Rmlyy
Created June 20, 2021 07:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rmlyy/e4eeb648b3267c2a6414a9d89e34e7a7 to your computer and use it in GitHub Desktop.
Save Rmlyy/e4eeb648b3267c2a6414a9d89e34e7a7 to your computer and use it in GitHub Desktop.
Command line upload script
#!/bin/bash
file=$1
if [[ -z $1 ]]; then
echo "Please specify a file."
exit
fi
if [[ ! -f "$file" ]]; then
echo "$file does not exist."
exit
fi
UPLOAD=$(curl -s -F file=@$file https://share.rmly.dev/api | jq -r '.url')
echo $UPLOAD
echo $UPLOAD | xclip -sel c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment