feat: flameshot script automatically assigns HTTP/HTTPS protocol

pull/243/head
Josh Moore 1 year ago
parent ce350d4fd0
commit f49fe2e0b3

@ -41,7 +41,8 @@ if [ -f "$FILE" ]; then
# Configure upload fields
FIELD="$([[ $MODE -eq 0 ]] && echo "file" || echo "image")=@$FILE"
POSTTO="https://$DOMAIN/$([[ $MODE -eq 0 ]] && echo "" || echo "upload")"
[[ "${DOMAIN%%:*}" = "127.0.0.1" ]] && PROTOCOL="http" || PROTOCOL="https"
POSTTO="$PROTOCOL://$DOMAIN/$([[ $MODE -eq 0 ]] && echo "" || echo "upload")"
# Upload the file
URL=$(curl -sS -X POST \

Loading…
Cancel
Save