Files
flameshot/.travis/services/0x0.st.sh
Ahmed Zetao Yang cb59757848 improve CI upload service (#514)
*  improve CI upload service 
*  fedora 29 supported
*  fedora 27 removed
*  ubuntu 19.04 supported
2019-04-28 13:28:18 +02:00

26 lines
605 B
Bash

#!/bin/sh
#===============================================================
# File URLs are valid for at least 30 days and up to a year (see below).
# Shortened URLs do not expire.
# Maximum file size: 512.0 MiB
# Blocked file types: application/x-dosexec, application/x-executable
#===============================================================
URL="https://0x0.st"
if [ $# -eq 0 ]; then
echo "Usage: 0x0.st FILE\n"
exit 1
fi
FILE=$1
if [ ! -f "$FILE" ]; then
echo "File ${FILE} not found"
exit 1
fi
RESPONSE=$(curl -# -F "file=@${FILE}" "${URL}")
echo "${RESPONSE}" # to terminal