Last active
August 29, 2015 14:26
-
-
Save andrefs/15e90c61bbf5ec2b34f7 to your computer and use it in GitHub Desktop.
upload_cover.sh
This file contains hidden or 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 | |
| DIR=$(dirname $0) | |
| pubID="$1" | |
| if [ -z "$pubID" ]; then | |
| pubID='4090' | |
| fi | |
| FILE="$2" | |
| if [ -z "$FILE" ]; then | |
| FILE='4.png' | |
| fi | |
| curl -XPOST \ | |
| -w "\n%{http_code}\n%{content_type}" \ | |
| -F 'token=superslicez' \ | |
| -F "pubID=${pubID}" \ | |
| -F "source=crawler" \ | |
| -F "autoPublish=1" \ | |
| -F "file=@${DIR}/${FILE}" \ | |
| http://localhost:9099/covers/upload \ | |
| ; echo | |
| #-F 'date=2015-01-26 19:39:26.771007500' \ | |
| #-F 'date=2014-04-20' \ | |
| #-F "md5=2a4d6fd43165c278da602ec598f9ccea" \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment