-
-
Save amorev/83219962c3d9368190796d32110f49b0 to your computer and use it in GitHub Desktop.
Sending file via Telegram from terminal
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/sh | |
chatId=<YOUR_CHAT_ID> | |
botToken=<YOUR_BOT_TOKEN> | |
curdir=$PWD | |
echo sending $curdir/$1 | |
curl -F chat_id=$chatId -F document=@$curdir/$1 https://api.telegram.org/bot$botToken/sendDocument | |
# more about gist on my site — amorev.ru/telegram-terminal-file-send |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment