Created
January 13, 2021 09:23
-
-
Save smd877/d05baac3060a4b405d4120fbcf1f7291 to your computer and use it in GitHub Desktop.
Slackにファイルアップロードするシェルスクリプト(送信チャンネルとトークンは環境変数に入れておく)
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 | |
if [ $# -ne 1 ]; then | |
echo "Params error." | |
exit 1 | |
fi | |
curl -F file=@$1 -F channels=$POST_SLACK_CHANNEL_ID -H "Authorization: Bearer $POST_SLACK_TOKEN_ID" https://slack.com/api/files.upload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment