mirror of
https://github.com/mvschwarz/openrig.git
synced 2026-10-02 08:35:15 +08:00
An update row's local evidenceRef screenshot delivered as text only: the daemon
logged "ATTACHMENT upload-url FAILED ...: invalid_arguments (text delivered;
attachment missing)". files.getUploadURLExternal was sent as a JSON POST.
Slack's reference lists JSON for it, but the method reads form fields only and
answers a JSON body with invalid_arguments ("missing required field: length /
filename").
- callWebApi gets a "form-post" shape: url-encoded fields, objects/arrays as
JSON strings, the way Slack's own Web API client sends every call. Both
files.getUploadURLExternal and files.completeUploadExternal use it; the
JSON-POST family (auth.test, apps.connections.open, chat.postMessage) is
unchanged.
- Local attachments (LOCAL_ATTACHMENT_EXT): the image types plus .mp4, .webm,
.mov and .pdf, at most 50 MiB (stat before read). LOCAL_IMAGE_EXT still gates
https Block Kit image blocks (#47), so a video URL never becomes one.
- The byte upload's default timeout grows with the size (15 s + 1 s / 512 KiB).
- An attachment that can't be sent (over the cap, missing, not a regular file)
logs "ATTACHMENT skipped ... (text delivered; attachment missing)" instead of
being silently dropped; a non-attachment ref (e.g. PROOF.md) stays silent.
Tests: the slack-images fake now answers a JSON getUploadURLExternal with
invalid_arguments, as live; form shapes for both upload methods; video through
the three legs; the reader's allowlist, cap boundary and skip reasons.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>