Created
December 15, 2016 21:18
-
-
Save OkashiOdayakana/10171df45770bc1998d716e7e0f6cb2f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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