Files
amethyst/desktopApp/src
Vitor PamplonaandClaude Opus 5.5 c2fda6aae2 feat(uploads): fall back through the Blossom server list when an upload fails
An upload went to the one server picked in the dialog and failed there. Which
servers accept what isn't visible in advance: primal, azzamo and blossom.band
answer an encrypted (application/octet-stream) blob with 415, the paid ones
with 402, and any server can be down. So an encrypted chat attachment failed
depending on which default happened to be selected. The Blossom settings
screen already told users uploads 'try each server from the top down'; nothing
did.

Blossom uploads, plain and encrypted, now try the picked server first and then
the rest of the list the picker offered (the user's kind-10063 servers, or the
defaults when they have none), top down, skipping duplicates. An encrypted
upload re-sends the same ciphertext, so its key, nonce and hash stay valid
wherever it lands. A read-only login stops at once; if every server fails, the
selected server's error is shown. NIP-96 and NIP-95 keep a single target.

White Noise (MDK 0.10.4) fetches any safe https Blossom URL, not only the
group policy's endpoints, so a fallback server is readable by it.

The shared JVM UploadOrchestrator (desktop app and amy) gets the same
behaviour: upload/uploadEncrypted take the account's other servers and try
them in order; the desktop DM, note composer and profile-picture uploads pass
the list. Its auth header isn't server-scoped, so one serves every attempt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 23:43:32 -04:00
..