FT-WP-0001-T14: upload post images instead of linking them
The adapter fetches visual_url from an allowlisted host (https, image types, 10 MB cap, optional read token) and uploads it as multipart sendPhoto, so the forge can close without breaking post images. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 5457@bnt-lap001 Assistant-Session: 792bf84a-3783-4f5d-a811-cded61dd2012
This commit is contained in:
parent
e70c8be67d
commit
86cbb43965
8 changed files with 379 additions and 5 deletions
|
|
@ -83,7 +83,11 @@ token=$(bao read -format=json \
|
|||
| python3 -c 'import sys, json; print(json.load(sys.stdin)["data"]["data"]["token"])') \
|
||||
|| { rm -rf "$tmp"; echo "could not read the bot token from OpenBao (logged in? read on platform/data/workloads/infotech/fluid-telegram/hall-of-helix/*?)" >&2; exit 2; }
|
||||
|
||||
# Images are fetched by the adapter and uploaded (FT-WP-0001-T14), so the
|
||||
# forge need not serve them publicly. FORGE_READ_TOKEN, when set, is a
|
||||
# read-only forge identity for closed repositories.
|
||||
TELEGRAM_BOT_TOKEN=$token TELEGRAM_CHANNEL_ID=$TELEGRAM_CHANNEL_ID ATTACH_VISUAL=true \
|
||||
UPLOAD_VISUALS=true FORGE_READ_TOKEN=${FORGE_READ_TOKEN:-} \
|
||||
ADAPTER_LISTEN_ADDR=127.0.0.1:$port "$tmp/adapter" &
|
||||
pid=$!
|
||||
unset token
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue