Oddbean new post about | logout
 Added another helper method to "blossom-client-sdk` https://github.com/hzrd149/blossom-client-sdk/blob/master/src/image.ts#L66

"handleBrokenImages" can be used to watch the whole web page and handle any broken images. when it finds one it tries to find the data-pubkey attribute on the image (or parent element) and then repair the image using the users fallback blossom servers

You can see an example of it working here:
https://media-server.slidestr.net/68f8b000316625d770788135ee94966df01dae50a7db11e4acc8ee7f1efc4ccf.html 
 I was trying to use the sdk on nodejs yesterday, first I had to add some fake  FileReader with readAsArrayBuffer, then it started failing on stream().pipe, so I had to make my custom uploadFile. I have no idea how to deal with these cross platform issues properly, if you do, would be awesome to have it working on nodejs well. Thanks! 
 Also any other blossom server aside from satellite and slidestr? 
 @Kieran built one in rust that supports NIP-96 https://git.v0l.io/Kieran/void-cat-rs 
 Thanks, any deployed ones? 
 I've mostly built the client sdk for the browser but Ill try to iron out the bugs on nodejs. might also try and support bum and deno 
 Thanks! Btw why not nip98 for auth? To avoid sha-ing big files? 
 The upload authorization event for blossom is intended to be used for uploading the blob to multiple servers and the NIP-98 event is scoped to a single server/endpoint. also even NIP-98 expects a hash of the content if the user is sending something to the server 
 FWIW, I can't get the first image to load when I first open the page. If I refresh the page, it loads fine. 
 Might be due to a websock connection issue. I hacked together nostr-tools to fetch users server lists from hard-coded list of relays