This commit is contained in:
2026-07-12 08:16:17 +03:30
commit 72be1234e1
2027 changed files with 221388 additions and 0 deletions
Executable
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env sh
if [ -z "$1" ]; then
echo "usage: $0 <file>"
exit 1
fi
FILE="$1"
RESPONSE=$(curl -s -X POST \
-F "file=@${FILE}" \
https://coast.is-terrible.com/api/files/create)
URL=$(echo "$RESPONSE" | jq -r '.url')
THUMBNAIL_URL=$(echo "$RESPONSE" | jq -r '.thumb')
DELETION_URL=$(echo "$RESPONSE" | jq -r '.del_url')
ERROR=$(echo "$RESPONSE" | jq -r '.error')
if [ "$ERROR" != "null" ]; then
echo "Error uploading file: $ERROR"
exit 1
fi
echo "file uploaded successfully!"
echo "url: $URL"
echo "thumbnail url: $THUMBNAIL_URL"
echo "deletion url: $DELETION_URL"