Skip to content

Instantly share code, notes, and snippets.

@OkashiOdayakana
Created December 15, 2016 21:18
Show Gist options
  • Save OkashiOdayakana/10171df45770bc1998d716e7e0f6cb2f to your computer and use it in GitHub Desktop.
Save OkashiOdayakana/10171df45770bc1998d716e7e0f6cb2f to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ -z "$key" ]
then
echo "Please enter your key"
read key
fi
echo "Please enter the file you want to upload."
read entry
mimetype=$(file -b --mime-type $entry)
curl -F "files[]=@"$entry"; type=$mimetype" https://api.whats-th.is/upload/pomf?key="$key"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment