sync: 2026-03-14 17:28 — 45 files from Alexandria
Some checks failed
Some checks failed
RoadChain-SHA2048: abc9be08a46f52c2 RoadChain-Identity: alexa@sovereign RoadChain-Full: abc9be08a46f52c20e45ae95233112ee88407ca3a606ec0ef568784041b755a56343cf4d7b817f2f4f7a11ec3f34ce826f607b2150a77248ade06b449e5b7e281b4be665ab148c46e3b71c9c029ee4d77f120e5919a7b87b0b7b6ed45f12c87f420fdda633f3bae4c5f7b851979bb52c725913fa63300772174263d1e64a02aa3356f73819e1110ad94d16836fa9f24b40e60e2da2f252506fbf02f82acc5fb8e03fd6ec08691ea60dea318ce5099a93d8ead7f9ef45b13a1ab533f592b60c702a0ba854b243e94be7eece0bfab14f822a928f8681c8777dc6a881da7e2ec324d6ace471f6c3f77ad83a22bfea01760be75f191128aa0a100d497dd0f0801ea8
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Upload images to images.blackroad.io from any node
|
||||
# Usage: ./upload.sh <file> [prompt] [provider] [model]
|
||||
# Example: ./upload.sh render.png "cyberpunk city" "comfyui" "sdxl"
|
||||
# Batch: for f in *.png; do ./upload.sh "$f" "" "local"; done
|
||||
|
||||
set -e
|
||||
|
||||
ENDPOINT="https://images.blackroad.io"
|
||||
FILE="${1:?Usage: $0 <file> [prompt] [provider] [model]}"
|
||||
PROMPT="${2:-}"
|
||||
PROVIDER="${3:-upload}"
|
||||
MODEL="${4:-}"
|
||||
NODE=$(hostname)
|
||||
|
||||
if [ ! -f "$FILE" ]; then
|
||||
echo "File not found: $FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Uploading: $FILE ($(du -h "$FILE" | cut -f1)) from $NODE..."
|
||||
|
||||
RESULT=$(curl -s -X POST "$ENDPOINT/api/upload" \
|
||||
-F "file=@$FILE" \
|
||||
-F "filename=$(basename "$FILE")" \
|
||||
-F "prompt=$PROMPT" \
|
||||
-F "provider=$PROVIDER" \
|
||||
-F "model=$MODEL" \
|
||||
-F "source_node=$NODE")
|
||||
|
||||
ID=$(echo "$RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('id',''))" 2>/dev/null || echo "")
|
||||
|
||||
if [ -n "$ID" ]; then
|
||||
echo "OK: $ENDPOINT/img/$ID.${FILE##*.}"
|
||||
else
|
||||
echo "Error: $RESULT"
|
||||
exit 1
|
||||
fi
|
||||
1
bin/br-upload
Symbolic link
1
bin/br-upload
Symbolic link
@@ -0,0 +1 @@
|
||||
/Users/alexa/images-blackroad/upload.sh
|
||||
Reference in New Issue
Block a user